jQuery in Action, 3rd edition
The moose likes Distributed Java and the fly likes AccessControlException with rmi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "AccessControlException with rmi" Watch "AccessControlException with rmi" New topic

AccessControlException with rmi

syed naqvi

Joined: Nov 07, 2002
Posts: 1
I am trying to run a very basic Hello world application in rmi. I have properly deployed all the files as described in tutorial but when i try to start the server through following command
D:\>java -/D:\RMI\public_html\myclasses\examples\
hello/ -Djava.security.policy=java.policy examples.hello.HelloImpl

I got AccessControlException with following message:
HelloImpl error:access denied (java.net.SocketPermission connect,
java.security.AccessControlException: access denied (java.net.SocketPermission 1 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
at java.security.AccessController.checkPermission(AccessController.java:
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1044)
at java.net.Socket.<init>(Socket.java:262)
at java.net.Socket.<init>(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:318)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at examples.hello.HelloImpl.main(HelloImpl.java:31)
please help me and I immediatly need help as I have little time
thank you
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

It looks like the registry service isn't started yet.
I agree. Here's the link: http://aspose.com/file-tools
subject: AccessControlException with rmi
It's not a secret anymore!