Since a few days i get the following error when I try to run my java server application:
SEVERE: Stratego server exception: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.net.SocketTimeoutException: Read timed out
My main method looks like:
Stratego stratego = new Stratego();
try
{
if (System.getProperty("java.security.policy") == null)
{
System.setProperty("java.security.policy", "src/Server/Policy/server.policy");
}
if (System.getProperty("java.rmi.server.codebase") == null)
{
System.setProperty("java.rmi.server.codebase", "file:/D:/.../build/classes");
}
if (System.getSecurityManager() == null)
{
System.setSecurityManager(new RMISecurityManager());
}
LocateRegistry.createRegistry(9292);
Naming.rebind("rmi://localhost:9292/StrategoServer", stratego);
Logger.getLogger(Stratego.class.getName()).info("Stratego server ready");
}
catch (Exception e)
{
Logger.getLogger(Stratego.class.getName()).log(Level.SEVERE, "Stratego server exception: {0}", e.toString());
}
The policy, codebase and SecurityManager are new but when i comment them out, I still get this error. It all worked well before.
Can anyone tell me why?
Oh btw, I use Windows 7 x64 and JDK 7
No comments:
Post a Comment