|Possible solution for 'Error logged from Ant UI' [message #802412]
||Sun, 19 February 2012 23:37
| Chris Arsenault
Registered: February 2012
I was attempting to run an Ant build configuration with no environment variables and I kept getting the following error:|
!ENTRY org.eclipse.ant.launching 4 120 2012-02-19 17:36:57.314
!MESSAGE Error logged from Ant UI:
java.net.SocketTimeoutException: Accept timed out
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(Unknown Source)
at java.net.ServerSocket.implAccept(Unknown Source)
at java.net.ServerSocket.accept(Unknown Source)
The only environment variable in my Ant build configuration was the ANT_HOME variable and it was set to the Ant plugin directory in Eclipse.
If I switched to 'Append environment to native environment', my build configuration ran successfully. However, when I ran with 'Replace native environment with specified environment' and only the ANT_HOME variable set, the error above would be written to the eclipse log and the configuration would terminate with nothing written to the console.
In my searching for an answer to this issue, I found that many other people also hit this issue and there were several different suggestions, some of them worked for some people but not for everyone. All those suggestions did not work for me so I decided to experiment with the environmental variables.
I added all the environment variables available via the 'Select...' button and it worked fine. So, then I whittled down the list until I found that I needed only one other environment variable for the configuration to run successfully and that variable was the 'SystemRoot' variable.
So, I thought I would post this topic in case this solution helps others. I'm not sure why it works for me but it did. If anyone has any thoughts on why this worked, please reply to this message with the answer.
As for my system specs:
HP Pavilion dv7 laptop
Windows 64-bit system
Eclipse Helios 3.6.1 (64-bit)
I hope this helps
|Re: Possible solution for 'Error logged from Ant UI' [message #825347 is a reply to message #802412]
||Tue, 20 March 2012 18:52
| Robb Jones
Registered: March 2012
We had the same issue trying to connect to an Oracle database running via an Eclipse Java Application configuration (Run As) on several machines. On one machine, setting SystemRoot resolves the problem (Env mode = replace + explicit setting or Env mode = append and pull from the system environment). The other machine fails, regardless.|
I've also been able to duplicate this outside of Eclipse, running in Ant.
will trigger the problem. Setting newenvironment = false resolves the issue (likely b/c SystemRoot is then defined).
I'm fairly sure the error text originates from the Oracle driver ("Io exception: The Network Adapter could not establish the connection")
Putting our experiences together, I'd say this suggests some underlying network code is dependent on this environment setting, and therefore likely limited to Windows some/all platforms.
Anyway, here is what such a stack trace looks like:
EtlStart.java:145 is calling BasicDataSource.getConnection().
13:27:17 ERROR (EtlStart.java:257) - Exception in EtlStart.main(): Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Io exception: The Network Adapter could not establish the connection)
Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
... 2 more
Oracle Java 1.6.0_30
Both Eclipse 3.3.2 & 3.7
Oracle server 22.214.171.124.0
Oracle jdbc driver 10.2.0.1.0
Powered by FUDForum
. Page generated in 0.02613 seconds