Win a copy of Securing DevOps this week in the Security forum!

NJ Ban

+ Follow
since Oct 17, 2003
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by NJ Ban

Mike, I tried but it doesn't make any difference. I still get the same error. Is there any known software conflicts?
14 years ago
I was running Sun's sample RMI code and it still gives me a problem. I looked up many helps on-line and I think I did everything correctly but I am still facing problem. Please help.
1. First everthing is under D:\TIEJ1.1\Code\rmiex and the service name is given as following in engine\
String name = "//localhost/Compute";
2. Then compiled this code.
set classpath=D:\TIEJ1.1\Code\rmiex
javac engine\
rmic -d . engine.ComputeEngine
3. So there are three classes in engine directory, ComputeEngine.class, ComputeEngine_Stub.class and ComputeEngine_Skel.class.
4. java2.policy file is set like this in D:\TIEJ1.1\Code\rmiex.
grant codebase "file://D:/TIEJ1.1/Code/rmiex/*" {
permission "*:1024-",
permission "*:80",
5. Run the server code.
set classpath=D:\TIEJ1.1\Code\rmiex
java -Djava.rmi.server.codebase=file// :/TIEJ1.1/Code/rmiex
6. Now i get SocketPermission error.
ComputeEngine exception: access denied ( connect,resolve) access denied ( connect,resolve)
at Source)
at Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at Source)
at Source)
at<init>(Unknown Source)
at<init>(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 engine.ComputeEngine.main(
Most of the people who saw the same error seemed to solve the problem by fixing policy file but I cannot do that. I don't know why. The only thing that I could think of was Norton firewall. So I tried the same thing turning on and off Norton but it doesn't make any difference. Does anyone have a clue? Please help me on this.
14 years ago