RMI firewall issues

S

somersbar

im doing an assignment on 'rmi client callbacks' in college and am
having difficulty with the windows firewall here. when i try and run
the server i get the following error msg:

Exception in thread "main" java.security.AccessControlException: access
denied (
java.net.SocketPermission 157.190.187.162:10005 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.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(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.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at RMIServer.main(RMIServer.java:46)

iv been told i have to do something with a policy file and tried but
still doesn't seem to help. im not even sure if im duin it right.

any advice appreciated.
 
Joined
Jul 28, 2006
Messages
1
Reaction score
0
you need to set up the policy terms...

One qay for setting up the policy terms is to creat a file, named "policy.all" on the same folder of the application with this content:

grant {
// Total permissive
permission java.security.AllPermission;
}

them you execute your application on this way


java -Djava.security.policy=policy.all applicationName

this should be work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top