Re: rmi classloading exceptions when launching 1.1

2006-04-26 Thread Sachin Patel

At worst case adding duplicate jars with increase the size 1-1.5 megs.

Thank you for listening to my conversation with myself :)

- sachin



On Apr 26, 2006, at 10:05 AM, Sachin Patel wrote:

Ok playing around I think I figured out the problem, but its going  
to be tricky getting a correct solution.  The issue is the  
following...


 I'm supporting both V1 and V11 there are several jars at the same  
versions between 1.0 and 1.1 namely (mx4j, commons-logging, spec  
jars, etc..).  Now I wanted to avoid repacking these jars multiple  
times so I pushed these into a common runtime plugin, where the V1  
and V11 runtime bundles would depend on.  The issue seems to be  
that the common plugin is where the de-serialization is happening  
and this bundle has no visibility to the class causing the CNF  
exception since the class is a V11 specific jar.  As soon as I put  
a dependency on the V11 runtime bundle, the problem was resolved.   
However this (1) introduces a circular dependency between  
runtime.common and runtime.v11, and (2) Following the same pattern  
I would have to put a dependency on runtime.common to runtime.v1,  
which of course introduces the problem of multiple version of  
clasess in the same cp.


So I'm going to play around with it some more but it may come down  
to that I am forced for at least a subset of the "common jars" to  
ship duplicates to get both V1 and V11 working and without  
introducing any circular dependencies or multiple versions of  
classes in the same bundle classpath.



- sachin



On Apr 26, 2006, at 8:31 AM, Sachin Patel wrote:

Shoot, I was hoping a stand-alone test case would fail as well,  
but it doesn't.  :( So the issue is specific to invoking this  
within eclipse bundles.


- sachin



On Apr 25, 2006, at 11:17 PM, Sachin Patel wrote:

I'm running into the following exception when launching 1.1  
within eclipse and I can't figure out what is the root cause.   
The actual launch of the server is ok but the plugin code checks  
for when geronimo is fully started by checking the  
kernelFullyStarted attribute.  I'm hitting the following set of  
exceptions below in my call to...


AbstractNameQuery query = new AbstractNameQuery 
(PersistentConfigurationList.class.getName());

Set configLists = kernel.listGBeans(query);

IIRC this is the same set of exceptions when people launched  
eclipse in a 1.5 JVM, however in this case I'm launching in 1.4  
and I verified that the 1.0 support still works when calling the  
same code...  I verified the G 1.1 jars I'm repackaging are the  
same as the ones inside the 1.1 image I'm launching but I'm  
hitting this now every single time. :(


Does anyone have any ideas???

org.apache.geronimo.kernel.InternalKernelException:  
java.rmi.UnmarshalException: error unmarshalling return; nested  
exception is:
	java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)
	at org.apache.geronimo.system.jmx.KernelDelegate.listGBeans 
(KernelDelegate.java:831)
	at  
org.apache.geronimo.st.v11.core.GeronimoServerBehaviour.isFullyStart 
ed(GeronimoServerBehaviour.java:158)

at org.apache.geronimo.st.core.PingThread.run(PingThread.java:57)
Caused by: java.rmi.UnmarshalException: error unmarshalling  
return; nested exception is:
	java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
	at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke 
(Unknown Source)

at mx4j.remote.rmi.ClientInvoker.invoke(ClientInvoker.java:207)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
	at mx4j.remote.rmi.ClientUnmarshaller.chain 
(ClientUnmarshaller.java:65)
	at mx4j.remote.rmi.ClientUnmarshaller.invoke 
(ClientUnmarshaller.java:54)

at $Proxy0.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
	at mx4j.remote.rmi.ClientExceptionCatcher.invoke 
(ClientExceptionCatcher.java:40)

at $Proxy0.invoke(Unknown Source)
	at org.apache.geronimo.system.jmx.KernelDelegate.invokeKernel 
(KernelDelegate.java:880)
	at org.apache.geronimo.system.jmx.KernelDelegate.listGBeans 
(KernelDelegate.java:827)

... 2 more
Caused by: java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)

at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
at 

Re: rmi classloading exceptions when launching 1.1

2006-04-26 Thread Sachin Patel
Ok playing around I think I figured out the problem, but its going to  
be tricky getting a correct solution.  The issue is the following...


 I'm supporting both V1 and V11 there are several jars at the same  
versions between 1.0 and 1.1 namely (mx4j, commons-logging, spec  
jars, etc..).  Now I wanted to avoid repacking these jars multiple  
times so I pushed these into a common runtime plugin, where the V1  
and V11 runtime bundles would depend on.  The issue seems to be that  
the common plugin is where the de-serialization is happening and this  
bundle has no visibility to the class causing the CNF exception since  
the class is a V11 specific jar.  As soon as I put a dependency on  
the V11 runtime bundle, the problem was resolved.  However this (1)  
introduces a circular dependency between runtime.common and  
runtime.v11, and (2) Following the same pattern I would have to put a  
dependency on runtime.common to runtime.v1, which of course  
introduces the problem of multiple version of clasess in the same cp.


So I'm going to play around with it some more but it may come down to  
that I am forced for at least a subset of the "common jars" to ship  
duplicates to get both V1 and V11 working and without introducing any  
circular dependencies or multiple versions of classes in the same  
bundle classpath.



- sachin



On Apr 26, 2006, at 8:31 AM, Sachin Patel wrote:

Shoot, I was hoping a stand-alone test case would fail as well, but  
it doesn't.  :( So the issue is specific to invoking this within  
eclipse bundles.


- sachin



On Apr 25, 2006, at 11:17 PM, Sachin Patel wrote:

I'm running into the following exception when launching 1.1 within  
eclipse and I can't figure out what is the root cause.  The actual  
launch of the server is ok but the plugin code checks for when  
geronimo is fully started by checking the kernelFullyStarted  
attribute.  I'm hitting the following set of exceptions below in  
my call to...


AbstractNameQuery query = new AbstractNameQuery 
(PersistentConfigurationList.class.getName());

Set configLists = kernel.listGBeans(query);

IIRC this is the same set of exceptions when people launched  
eclipse in a 1.5 JVM, however in this case I'm launching in 1.4  
and I verified that the 1.0 support still works when calling the  
same code...  I verified the G 1.1 jars I'm repackaging are the  
same as the ones inside the 1.1 image I'm launching but I'm  
hitting this now every single time. :(


Does anyone have any ideas???

org.apache.geronimo.kernel.InternalKernelException:  
java.rmi.UnmarshalException: error unmarshalling return; nested  
exception is:
	java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)
	at org.apache.geronimo.system.jmx.KernelDelegate.listGBeans 
(KernelDelegate.java:831)
	at  
org.apache.geronimo.st.v11.core.GeronimoServerBehaviour.isFullyStarte 
d(GeronimoServerBehaviour.java:158)

at org.apache.geronimo.st.core.PingThread.run(PingThread.java:57)
Caused by: java.rmi.UnmarshalException: error unmarshalling  
return; nested exception is:
	java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
	at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke 
(Unknown Source)

at mx4j.remote.rmi.ClientInvoker.invoke(ClientInvoker.java:207)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
	at mx4j.remote.rmi.ClientUnmarshaller.chain 
(ClientUnmarshaller.java:65)
	at mx4j.remote.rmi.ClientUnmarshaller.invoke 
(ClientUnmarshaller.java:54)

at $Proxy0.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
	at mx4j.remote.rmi.ClientExceptionCatcher.invoke 
(ClientExceptionCatcher.java:40)

at $Proxy0.invoke(Unknown Source)
	at org.apache.geronimo.system.jmx.KernelDelegate.invokeKernel 
(KernelDelegate.java:880)
	at org.apache.geronimo.system.jmx.KernelDelegate.listGBeans 
(KernelDelegate.java:827)

... 2 more
Caused by: java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)

at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java: 
631)

at 

Re: rmi classloading exceptions when launching 1.1

2006-04-26 Thread Sachin Patel
Shoot, I was hoping a stand-alone test case would fail as well, but  
it doesn't.  :( So the issue is specific to invoking this within  
eclipse bundles.


- sachin



On Apr 25, 2006, at 11:17 PM, Sachin Patel wrote:

I'm running into the following exception when launching 1.1 within  
eclipse and I can't figure out what is the root cause.  The actual  
launch of the server is ok but the plugin code checks for when  
geronimo is fully started by checking the kernelFullyStarted  
attribute.  I'm hitting the following set of exceptions below in my  
call to...


AbstractNameQuery query = new AbstractNameQuery 
(PersistentConfigurationList.class.getName());

Set configLists = kernel.listGBeans(query);

IIRC this is the same set of exceptions when people launched  
eclipse in a 1.5 JVM, however in this case I'm launching in 1.4 and  
I verified that the 1.0 support still works when calling the same  
code...  I verified the G 1.1 jars I'm repackaging are the same as  
the ones inside the 1.1 image I'm launching but I'm hitting this  
now every single time. :(


Does anyone have any ideas???

org.apache.geronimo.kernel.InternalKernelException:  
java.rmi.UnmarshalException: error unmarshalling return; nested  
exception is:
	java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)
	at org.apache.geronimo.system.jmx.KernelDelegate.listGBeans 
(KernelDelegate.java:831)
	at  
org.apache.geronimo.st.v11.core.GeronimoServerBehaviour.isFullyStarted 
(GeronimoServerBehaviour.java:158)

at org.apache.geronimo.st.core.PingThread.run(PingThread.java:57)
Caused by: java.rmi.UnmarshalException: error unmarshalling return;  
nested exception is:
	java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:169)
	at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke 
(Unknown Source)

at mx4j.remote.rmi.ClientInvoker.invoke(ClientInvoker.java:207)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
	at mx4j.remote.rmi.ClientUnmarshaller.chain 
(ClientUnmarshaller.java:65)
	at mx4j.remote.rmi.ClientUnmarshaller.invoke 
(ClientUnmarshaller.java:54)

at $Proxy0.invoke(Unknown Source)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
at mx4j.remote.ClientProxy.invoke(ClientProxy.java:32)
	at mx4j.remote.rmi.ClientExceptionCatcher.invoke 
(ClientExceptionCatcher.java:40)

at $Proxy0.invoke(Unknown Source)
	at org.apache.geronimo.system.jmx.KernelDelegate.invokeKernel 
(KernelDelegate.java:880)
	at org.apache.geronimo.system.jmx.KernelDelegate.listGBeans 
(KernelDelegate.java:827)

... 2 more
Caused by: java.lang.ClassNotFoundException:  
org.apache.geronimo.gbean.AbstractName (no security manager: RMI  
class loader disabled)

at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java: 
631)

at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
	at sun.rmi.server.MarshalInputStream.resolveClass 
(MarshalInputStream.java:200)
	at java.io.ObjectInputStream.readNonProxyDesc 
(ObjectInputStream.java:1513)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java: 
1435)
	at java.io.ObjectInputStream.readOrdinaryObject 
(ObjectInputStream.java:1626)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at java.util.HashSet.readObject(HashSet.java:276)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)
	at java.io.ObjectStreamClass.invokeReadObject 
(ObjectStreamClass.java:838)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java: 
1746)
	at java.io.ObjectInputStream.readOrdinaryObject 
(ObjectInputStream.java:1646)

at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
... 19 more