java.security.AccessControlException of RMIServer
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Robin_Liu
Posted On:   Friday, August 10, 2001 06:53 AM

I'm running jGuru tutorial,"Fundamentals of RMI".I'm running into an access problem in the exercise of "RMI Parameters" chapter . I'm trying to run RMIServer, the value of the HOST_NAME is "localhost" and I get an error whose stack trace can be found at the end of this message. When I use my real computer name "robin",the same error occured. My OS:win2000 server ;jdk1.3.1 In the RMIServer.java code, the problem seems to come when Naming.rebind( urlString, h ); is executed (although I'm not sure). This is probably a trivial problem, but I can't figure it out. Does anyone know what I   More>>

I'm running jGuru tutorial,"Fundamentals of RMI".I'm running into
an access problem in the exercise of "RMI Parameters" chapter .


I'm trying to run RMIServer, the value of the
HOST_NAME is "localhost" and I get an error whose stack trace can
be found at the end of this message.
When I use my real computer name "robin",the same error occured.


My OS:win2000 server ;jdk1.3.1


In the RMIServer.java code, the problem seems to come when


Naming.rebind( urlString, h );


is executed (although I'm not sure). This is probably a trivial problem,
but I can't figure it out. Does anyone know what I have to do to get
this to work. The code below is directly from the tutorial, so it
should work.


thanks,


-robin


----------------------------------------



STACK TRACE:



E: mp
mipara>java RMIServer


Registry created on host computer localhost on port 10002


Remote HelloService implementation object created


Exception in thread "main" java.security.AccessControlException: access denied (
java.net.SocketPermission 127.0.0.1:10002 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. (Unknown Source)


at java.net.Socket. (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.rebind(Unknown Source)


at java.rmi.Naming.rebind(Unknown Source)


at RMIServer. (RMIServer.java:75)


at RMIServer.main(RMIServer.java:37)


E: mp
mipara>

   <<Less
About | Sitemap | Contact