Register / Login
File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of
Clojure in Action
this week in the
RMI client "access denied" problem
posted 12 years ago
Hi,I got the server successfully bound on my own pc, and tried to run the client. and I got an "access denied" exception somewhat like the following:
exception: access denied (java.net.SocketPermission 127.0.0.1:1099 connect, resolve) java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkConnect(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) 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 java.rmi.Naming.lookup(Unknown Source) at RMIClient.<init>(RMIClient.java:21) at RMIClient.main(RMIClient.java:29)
I have allowed all permission at serverside, and I've also set securitymanager in the client code. So what is the problem?
Every man dies, not every man really lives.
posted 12 years ago
did you bind your server to your PC ip address or did you bind it to 127.0.0.1?
I actually bind it twice when I want to run the client on the local machine and on a remote machine at the same time.
You don't have a firewall blocking 1099 do you?
Can you post your binding/rebinding code? It might help.
[ November 03, 2003: Message edited by: Chris Shepherd ]
I agree. Here's the link:
Error in lookup: java.rmi.ConnectException
MYSql Driver ClassNotFound Exception
java.policy setting not reflecting
RMI example code fails