Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
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