Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.rmi.ConnectIOException - PLEASE HELP!

 
Ravissant Saraswat
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,
I have a junit class which Im trying to call from another another main java class. Now it works just fine when this main class is in the same project but I get the following exception when I try to keep the same main class in another project and execute it :


2011-10-11 10:32:07 [ERROR] [] @ RemotePersistentOptimizationDelegate : lookupServer : 122 - Error looking up the remote server
java.rmi.ConnectIOException: Exception creating connection to: 10.39.x.x; nested exception is:
java.net.NoRouteToHostException: No route to host: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.accenture.ams.adaptiveAnalytics.effectiveness.optimization.service.RemotePersistentOptimizationDelegate.lookupServer(RemotePersistentOptimizationDelegate.java:115)
at com.accenture.ams.adaptiveAnalytics.effectiveness.optimization.service.RemotePersistentOptimizationDelegate.statusFileReader(RemotePersistentOptimizationDelegate.java:71)
at com.accenture.ams.adaptiveAnalytics.effectiveness.optimization.util.QueueMaintainer.checkOptimizedOutputGeneration(QueueMaintainer.java:284)


I checked the project for dependencies and added all projects to the main class' build path, still I get the above error. Is it some jar that im missing out?? Please,Please help!!

Thanks in advance,
Ravssant
 
Rob Spoor
Sheriff
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravissant Saraswat wrote:java.rmi.ConnectIOException: Exception creating connection to: 10.39.x.x; nested exception is:
java.net.NoRouteToHostException: No route to host: connect

You can't connect to the RMI server machine. Check your firewall settings.
 
Ravissant Saraswat
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply Rob, the main java project here is within the same eclipse workspace on the same machine, would the firewall still have a role to play? I was able to get the main class to work when I kept it in the same project as the JUnit test class.
 
Rob Spoor
Sheriff
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you ping that IP address (which I've anonymized by the way)? Is it the IP address of the PC itself, or the IP address you have on the Internet? (In other words, is it your WAN IP address or not?)
 
Ravissant Saraswat
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I'm not able to ping the ip address Rob, but then how is it that the main class works when Ii put it in the same project? Is the ip adress not used then?
 
Rob Spoor
Sheriff
Pie
Posts: 20532
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show the code that's trying to connect?
 
Ravissant Saraswat
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob, the following is the main class I'm using to call the JUnit class. My task basically is to write a project external to the JUnit project(within the same workspace), that calls JUnit classes in another project. Once again, this class executes fine when I keep it in the same project as the JUnit test classes.



To be very frank, the rest of the projects are a blackbox at the moment, I ran a search on the full workspace and did come up with a few xmls that have the same ip as the one thats figuring in the error.

Thanks a lot.

Ravissant
 
Ravissant Saraswat
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob,
Just to give you a better idea,this is the xml (please find attached) , thats being used :




Thanks!
Ravissant
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic