This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Question - Code Loading with RMI + Ignore Prev. Posting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Question - Code Loading with RMI + Ignore Prev. Posting" Watch "Question - Code Loading with RMI + Ignore Prev. Posting" New topic
Author

Question - Code Loading with RMI + Ignore Prev. Posting

Varun Rupela
Greenhorn

Joined: Feb 17, 2002
Posts: 12
Hi:
I am trying to do Dynamic Code Loading with RMI and am encountering the following problem:
- I am not sure if it is a problem with the SecurityManager but following is the exception that I get:

- I am using JDK 2.2, Standard Edition, v 1.3.0.
- In my application the stub is not available to the client locally and so the client must dynamically load the stub.
- As per Sun's RMI Tutorial - http://java.sun.com/docs/books/tutorial/rmi/running.html, I have used the following Security policy file to set up the Security Manager:
File Name: - "java.policy"

- The client code begins with the following lines:

- I run the client with the following command
java -Djava.rmi.server.codebase=http://localhost/~username/dist_obj_client/ -Djava.security.policy=java.policy clientdb_pkg.clientdb URL_remotehost
- If I use the above command to run the client program, I get the following output before the exception occurs:
"Security Policy Not Set".
Q1 - Is that expected? Shouldn't the SecurityManager be set to the java.policy file and not to a RMISecurityManager object?
Q2 - Does the exception mean that it might be a problem with the CLASSPATH of the shell in which RMI is started?
Thank you.


Varun Rupela<br />Graduate Research Assistant<br />Department of Computer Science and Software Engineering.<br />Auburn University.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question - Code Loading with RMI + Ignore Prev. Posting
 
Similar Threads
Session Bean Exception
How to run RMI Application in NetBeans 4.0
UnmarshalException while executing the Server Application
Dynamic Class Downloading Simple Question
RMI UnMarshal Exception.