Operating System - HP-UX
1829132 Members
2063 Online
109986 Solutions
New Discussion

RMI Security Manager problem porting from Win2k to HP-UX

 
Duarte Loreto
Occasional Contributor

RMI Security Manager problem porting from Win2k to HP-UX

Hello!

I have an AppServer (JBoss) where I deploy some EJBs and have some dynamic class loading code. This makes me need a different java.policy file and a security manager.

In windows, I created a new java.policy
grant {
permission java.security.AllPermission;
};
and modified the app startup to specify -Djava.security.policy=%TEST_HOME%/java.policy -Djava.security.manager

It works great.

Then I ported the app to HP-UX. I did the same thing.
-Djava.security.policy=$TEST_HOME/java.policy -Djava.security.manager

and the app fails when calling a bean with the following stack trace:
16:39:56,143 [ERROR,ProxyProxy] getClasses
java.lang.ClassNotFoundException: BusBeanHome
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jboss.proxy.ProxyProxy.getClasses(ProxyProxy.java:35)
at org.jboss.proxy.ProxyProxy.readResolve(ProxyProxy.java:49)
at java.lang.reflect.Method.invoke(Native Method)
at java.io.ObjectStreamClass.invokeMethod(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at java.rmi.MarshalledObject.get(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:439)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:419)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at Worker.executeMethod(Worker.java:243)
at Worker.run(Worker.java:144)
at java.lang.Thread.run(Unknown Source)

Where "Worker" is my class that does dynamic class loading using a string (class pack.name) from a file and BusBeanHome is the Home interface of the bean it is trying to invoke.

I'm 99% sure that this is JVM configuration on the policy side or something similar. Could anyone help on this?

Thank you for reading!

Duarte Loreto
Don't worry, be Happy!