Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI Error messages.  RSS feed

 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Couple of weeks ago, every single test programs i wrote on RMI worked perfectly but now,
I started having
""Exception Error: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)"" Tried everything possible : Noway out.

But now, I get another error message,

I just can't get anywhere with RMI.
I've read every possible documentation and spent hours to get solution please I need someone to help with new error message or advice me on an RMI Error messages book or web Document.

Run Window xp, JDK 5 update 5.

Thank you.

java.rmi.server.ExportException: Listen failed on port: 1099; nested exception i
s:
java.net.SocketException: Invalid argument: listen failed
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:245)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178
)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:18
0)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:317)
Caused by: java.net.SocketException: Invalid argument: listen failed
at java.net.PlainSocketImpl.socketListen(Native Method)
at java.net.PlainSocketImpl.listen(PlainSocketImpl.java:374)
at java.net.ServerSocket.bind(ServerSocket.java:320)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMI
DirectSocketFactory.java:27)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMI
MasterSocketFactory.java:333)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:62
2)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:231)
... 7 more


// Create and install a security manager
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
try {
HelloImpl obj = new HelloImpl();
// Bind this object instance to the name "HelloServer"
Naming.rebind("HelloServer", obj);
System.out.println("HelloServer bound in registry");
} catch (Exception e) {
System.out.println("HelloImpl err: " + e.getMessage());
e.printStackTrace();
}
 
Abiodun Okusolubo
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have re-run the same code in another computer, with same operating system and JVM, now I've gone back to the Java.security AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect, resolve)....
This Error message has been a menace. Please can anyone help.

Cheers
 
Jignesh Patel
Ranch Hand
Posts: 626
Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably you need to modify java.policy file and give permission to access perticular resource.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!