A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
RMI client "access denied" problem
Joined: Oct 22, 2003
Oct 30, 2003 16:54:00
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.
Joined: Jun 27, 2000
Nov 03, 2003 13:36:00
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 ]
Have you checked out
subject: RMI client "access denied" problem
Error in lookup: java.rmi.ConnectException
MYSql Driver ClassNotFound Exception
java.policy setting not reflecting
RMI example code fails
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015