access denied exception: (java.net.SocketPermission hostname resolve)
843793Feb 16 2005 — edited Nov 15 2006Hi,
I am running my server on a remote machine. The client tried to access the remote machine and I get the following error:
Receiver exception: access denied (java.net.SocketPermission hostname resolve)
java.security.AccessControlException: access denied (java.net.SocketPermission hostname resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1042)
at java.net.InetAddress.getAllByName0(InetAddress.java:988)
at java.net.InetAddress.getAllByName0(InetAddress.java:969)
at java.net.InetAddress.getAllByName(InetAddress.java:963)
at java.net.InetAddress.getByName(InetAddress.java:883)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:109)
at java.net.Socket.<init>(Socket.java:119)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:562)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at uploader.ClientSender.main(ClientSender.java:13)
the policy that I am using is
grant {
permission java.security.AllPermission;
};
the server is bound fine but still when I run the client I get the above error
another question is, my stub is located in server, connection is not HTTP connection, so how can I make sure the stub is accessible by the client for download?
Thanks,
S.