| Author |
RMI security issue in websphere
|
Dhananjay sem
Greenhorn
Joined: Mar 01, 2006
Posts: 2
|
|
Hi, I am getting below exception , also I am using policy file which sets to all permissions, I did see some post on the same site to fix this but not able to see now, i think this is something relatd to websphere. I did set the things like.. if(System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); this exception is coming when client is looking for the object. in server I am running rmiregistry first and then the following command to run the program java -Djava.rmi.server.hostname=ccAPS -Djava.security.policy=c:\ccAP\filetransfer\policy.txt com.filetransfer.FileServer The fileserver.java looks like ---------------------------------- package com.filetransfer; import java.rmi.Naming; import java.rmi.RMISecurityManager; import java.rmi.registry.*; import com.ccAPS.wrapper.WrapperCodes; public class FileServer { public static void main(String argv[]) { //System.out.println("1"); if(System.getSecurityManager() == null) { //System.out.println("2"); System.setSecurityManager(new RMISecurityManager()); //System.out.println("3"); } //System.out.println("4"); try { Registry regObj = LocateRegistry.createRegistry(2000); //System.out.println("5"); FileInterface fi = new FileImpl("FileServer"); //System.out.println("6"); Naming.rebind(WrapperCodes.DB_FILE_SERVER_OBJECT, fi); //System.out.println("7"); } catch(Exception e) { //System.out.println("FileServer: "+e.getMessage()); e.printStackTrace(); } } } ---------------------------------- this exception is coming when client is looking for the object. Exception is --java.lang.Exception: error unmarshalling return; nested exception is: java.lang.ClassNotFoundException: com.filetransfer.FileImpl_Stub (no security manager: RMI class loader disabled
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
|
See Sun's documentation on the codebase property - it sounds like your error is related to this...
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
Dhananjay sem
Greenhorn
Joined: Mar 01, 2006
Posts: 2
|
|
No, I did checked that, if you see the below part of the exception it is telling something about the security manager.. I saw a reply some where on your site earlier and that I am not able to find out now, what that raply says was something about the new security manager.. i do not remember much.. but it was some thing about that security manager part... Plz help.. also do i need to unset the classpth in the rmiregistry window before starting the rmiregistry.... or where do i need to set the classpath as exzception clearly says it is not able to find some class. is this on client side or on the server side.... no security manager: RMI class loader disabled
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
OK - sorry - I missed the "no security manager" exception part - Are you using RMISecurityManager in your client code also? (Was this the post you were originally looking for?) [ March 03, 2006: Message edited by: Nathan Pruett ]
|
 |
 |
|
|
subject: RMI security issue in websphere
|
|
|