This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, when I compile my classes and generate the rmi-stubs, I get the following exception:
java.rmi.ConnectException: Connection refused to host: localhost; nested exception is: java.net.ConnectException: Connection refused: 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.rebind(Unknown Source) at java.rmi.Naming.rebind(Unknown Source) at acme.core.Daemon.main(Daemon.java:76) Caused by: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(Unknown Source) at java.net.PlainSocketImpl.connectToAddress(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ... 7 more
I get the exception on 3 different servers (WIN and UNIX). Even when I try to start the program with older sourcefiles (that worked one year ago) it's the same.
I tried j2re1.4.2_05 and ..._09. Who can help me??
Hi, you we're right. Because I get the exception after a few hours, I commented it out and forgot to take the comments away... Thank you!
Joined: Sep 01, 2004
But do you have any idea, why the rmiregistry might crash after a few hours? My program runs a few hours and gets the java.rmi.ConnectException. And we have to restart the program.
Joined: Sep 11, 2005
Because the rmiregistry starts and the programs run correctly intially, I do not think there is any problem with the Java setup or the program.
This seems more like a problem with your network or local sys. Does crashing occur at any particular time? Probably there is some job scheduled that interrupts rmiregistry.
I guess this has more to do with your local sys or network. Try troubleshooting. There seems to be no problem from the java side of it.
Joined: Sep 01, 2004
But it's strange that only with the newer mysql-database 4.1.13 this error occurs. With two older mysql-versions (4.0.17 and 3.x.x) the program (rmiregistry?) doesn't crash. So we had to return to the older database.and everything works fine.