• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI security issue in websphere

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
See Sun's documentation on the codebase property - it sounds like your error is related to this...
 
Dhananjay sem
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Destroy anything that stands in your way. Except this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic