This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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
Author

AccessControlException with rmi

syed naqvi
Greenhorn

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 127.0.0.1:1099 connect,
resolve)
java.security.AccessControlException: access denied (java.net.SocketPermission 1
27.0.0.1:1099 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
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
SocketFactory.java:25)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:120)
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
Sheriff

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