It's not a secret anymore!
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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/ examples.hello.HelloImpl

I got AccessControlException with following message:
HelloImpl error:access denied ( connect,
resolve) access denied ( 1 connect,resolve)
at java.lang.SecurityManager.checkPermission(
at java.lang.SecurityManager.checkConnect(
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(
at sun.rmi.transport.tcp.TCPChannel.createConnection(
at sun.rmi.transport.tcp.TCPChannel.newConnection(
at sun.rmi.server.UnicastRef.newCall(
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(
at examples.hello.HelloImpl.main(
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:
subject: AccessControlException with rmi
It's not a secret anymore!