java.security.AccessControlException: access denied (java.net.SocketPermission skywalker 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.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getByName(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
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 DisplayPerfectTime.main(DisplayPerfectTime.java:10)
The line this is happening on is:
PerfectTimeI t = (PerfectTimeI)Naming.lookup("//skywalker:2005/PerfectTime");
I'm pretty certain I'm doing all the rmiregistry setup & stub/skeleton
compilation correctly, and that my code is correct (I got it from
"Thinking in Java"). I'm running Windows NT Server. Any ideas why I'm
getting this exception?
Vlad
---
"A programmer who subconsciously views himself as an artist will enjoy
what he does and will do it better."
-Donald Knuth, 1978
Is this an applet? An application running untrusted code with a
SecurityManager? What's happening is that the SecurityManager is preventing
you from contacting the remote host that you want to get the RMI object
from. But you don't mention that this is an applet, and if it's not then
something really funky is happening. :)
Chris Smith