Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
Photo

Java Security Policy problem !


  • Please log in to reply

#1
Dsypher

Dsypher

    Member

  • Member
  • PipPip
  • 97 posts
Hi,

I'm facing lot of problems with the Java Security policy. I just cant seem to over ride it ! I want to run a simple server program using RMI. At first I used to get the error :
java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:1024 connect,resolve)

Later, I created a "java.policy" file whose contents are:
/* AUTOMATICALLY GENERATED ON Tue Sep 14 18:15:27 BDT 2005*/
/* DO NOT EDIT */

grant {
  permission java.security.AllPermission;
};
and I saved this file in my server programs folder and ran the server program with the following command
java -Djava.security.policy=java.policy -Djava.rmi.server.codebase=file:///c:\rmi\server\ MyServer. Now I get this strange exception:
java.rmi.ServerException: Server RemoteException; nested exception is:java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:java.lang.ClassNotFoundException: MyServer_Stub

It says that the "MyServer_Stub.class" cannot be found but the class file is present both in the server folder and the client folder.

Pls Help !! Any sorta help wud be greatly appreciated.

Thanx in advance
  • 0

Advertisements


#2
stu_design

stu_design

    Member

  • Member
  • PipPipPip
  • 217 posts
could u send any code?
  • 0

#3
Dsypher

Dsypher

    Member

  • Topic Starter
  • Member
  • PipPip
  • 97 posts
I'm not sure I understand what you are asking. I get these exceptions when I compile my server program.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP