Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339296 - EHCache RMI Replication for Hibernate L2 cache fails with NotSerializableException: KernelBundleClassLoader
Summary: EHCache RMI Replication for Hibernate L2 cache fails with NotSerializableExce...
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.0.0.M05   Edit
Assignee: Glyn Normington CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 17:56 EST by David Arnold CLA
Modified: 2011-05-25 10:33 EDT (History)
1 user (show)

See Also:


Attachments
Full stack trace from serviceability/log.log (12.35 KB, text/plain)
2011-03-08 18:15 EST, David Arnold CLA
no flags Details
EHCache configuration (3.85 KB, application/xml)
2011-03-09 09:22 EST, David Arnold CLA
no flags Details
Binary bundle that replicates the stated behaviour (4.63 KB, application/octet-stream)
2011-05-24 12:19 EDT, David Arnold CLA
no flags Details
Source for bundle that replicates behaviour (7.92 KB, application/octet-stream)
2011-05-24 12:20 EDT, David Arnold CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Arnold CLA 2011-03-08 17:56:19 EST
Build Identifier: 2.1.0.RELEASE

I have an application packaged as a par, and the included persistence unit is using Hibernate 3.4.0 & JPA.  Using EHCache 1.6.2 to enable the Hibernate L2 cache works fine, but I need cache coherency across a cluster.  RMI replication looked like a good fit, and my persistence unit tests run fine in my IDE with it turned on (with diskPersistence="true").  When I deploy to Virgo, however, the JPA entityManagerFactory cannot be created.  The root of the problem is: 
Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //130.113.96.14:40001/org.hibernate.cache.StandardQueryCache. Initial cause was Error unmarshaling return; nested exception is:	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader

I can't imagine why it would want that class to be Serializable... or why it is being referenced at all here.

Reproducible: Always

Steps to Reproduce:
1.  Create a par that contains a JPA-annotated model, and a persistence unit using hibernate and EHCache RMI replication
2.  Deploy to virgo pickup directory
3.  Bang head on wall
Comment 1 David Arnold CLA 2011-03-08 18:15:37 EST
Created attachment 190713 [details]
Full stack trace from serviceability/log.log
Comment 2 David Arnold CLA 2011-03-09 09:22:52 EST
Created attachment 190757 [details]
EHCache configuration
Comment 3 Glyn Normington CLA 2011-05-10 07:39:50 EDT
Please could you supply the other pieces necessary to reproduce this problem. I'm afraid we don't have time to puzzle through the set up.
Comment 4 Glyn Normington CLA 2011-05-16 06:06:16 EDT
I tried to analyse the stack trace, but soon needed to know what version of EHCache you are running. From the description, it would appear to be later than 1.6.2, but there are multiple possibilities:

https://oss.sonatype.org/content/repositories/sourceforge-releases/net/sf/ehcache/ehcache-core/

However, I don't think the stack trace will be sufficient to identify the field in the object graph which is leading to the attempt to serialise the KernelBundleClassLoader.

Please attach a PAR which I can use to debug the problem.
Comment 5 Glyn Normington CLA 2011-05-18 08:20:37 EDT
Closing as "cannot reproduce" (=WORKSFORME).

David: if you are able to supply a PAR to reproduce this problem, kindly re-open this bug.
Comment 6 David Arnold CLA 2011-05-24 12:19:37 EDT
Created attachment 196461 [details]
Binary bundle that replicates the stated behaviour
Comment 7 David Arnold CLA 2011-05-24 12:20:22 EDT
Created attachment 196462 [details]
Source for bundle that replicates behaviour
Comment 8 David Arnold CLA 2011-05-24 12:28:04 EDT
I've added a simple bundle (with source) that replicates the stated behaviour on 2.1.0.RELEASE using ehcache 1.6.2 (the one bundled by SpringSource and available on their EBR).
Comment 9 Glyn Normington CLA 2011-05-25 09:43:48 EDT
Thanks David. The problem reproduces on the 3.0 line by placing ehcache 1.6.2 from the EBR in repository/usr and deploying the binary bundle you provided to pickup:


[2011-05-25 14:36:53.066] region-dm-3                  <AG0000E> Application context creation failure for bundle 'com.example.virgo-ehcache-rmi' version '0.0.1'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testCache' defined in URL [bundleentry://59.fwk2030014547/META-INF/spring/context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.example.virgo.ehcache.rmi.TestCache]: Constructor threw exception; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //10.26.2.134:40002/testCache. Initial cause was Error unmarshaling return; nested exception is: 
	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
	at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.example.virgo.ehcache.rmi.TestCache]: Constructor threw exception; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //10.26.2.134:40002/testCache. Initial cause was Error unmarshaling return; nested exception is: 
	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
	... 18 common frames omitted
Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //10.26.2.134:40002/testCache. Initial cause was Error unmarshaling return; nested exception is: 
	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:529)
	at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:157)
	at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:708)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:685)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:643)
	at com.example.virgo.ehcache.rmi.TestCache.<init>(TestCache.java:13)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
	... 20 common frames omitted
Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:227)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
	at java.rmi.Naming.rebind(Naming.java:160)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:233)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:527)
	... 30 common frames omitted
Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1332)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:225)
	... 35 common frames omitted
Caused by: java.io.NotSerializableException: org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:403)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	... 3 common frames omitted
Comment 10 Glyn Normington CLA 2011-05-25 09:58:00 EDT
The cause of the problem is that an ExtendedClassNotFoundException, which contains a non-volatile reference to the bundle class loader, is being serialised. The class not found is:

net .sf.ehcache.distribution.RMICachePeer_Stub

and the bundle attempting to load this class is:

com.example.virgo-ehcahe-rmi v0.0.1
Comment 11 Glyn Normington CLA 2011-05-25 10:11:09 EDT
Changing the non-volatile reference to be volatile produces better diagnostics, below. Note that I had to import the package org.eclipse.virgo.kernel.osgi.framework into com.example.virgo-ehcahe-rmi v0.0.1 so that it was able to load the class ExtendedClassNotFoundException. I think this is a combination of echcache's (de)serialisation logic combined with the normal weirdness of class loading during deserialisation.

[2011-05-25 15:07:41.734] region-dm-3                  <AG0000E> Application context creation failure for bundle 'com.example.virgo-ehcache-rmi' version '0.0.1'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testCache' defined in URL [bundleentry://59.fwk1092998686/META-INF/spring/context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.example.virgo.ehcache.rmi.TestCache]: Constructor threw exception; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //10.26.2.134:40002/testCache. Initial cause was RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [com.example.virgo-ehcache-rmi] (no security manager: RMI class loader disabled)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:911)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)
	at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
	at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
	at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
	at org.eclipse.virgo.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:95)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.example.virgo.ehcache.rmi.TestCache]: Constructor threw exception; nested exception is net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //10.26.2.134:40002/testCache. Initial cause was RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [com.example.virgo-ehcache-rmi] (no security manager: RMI class loader disabled)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
	... 18 common frames omitted
Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //10.26.2.134:40002/testCache. Initial cause was RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [com.example.virgo-ehcache-rmi] (no security manager: RMI class loader disabled)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:529)
	at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:157)
	at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:708)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:685)
	at net.sf.ehcache.CacheManager.addCache(CacheManager.java:643)
	at com.example.virgo.ehcache.rmi.TestCache.<init>(TestCache.java:13)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
	... 20 common frames omitted
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [com.example.virgo-ehcache-rmi] (no security manager: RMI class loader disabled)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:680)
	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
	at java.rmi.Naming.rebind(Naming.java:160)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:233)
	at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:527)
	... 30 common frames omitted
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
	java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [com.example.virgo-ehcache-rmi] (no security manager: RMI class loader disabled)
	at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
	at sun.rmi.transport.Transport$1.run(Transport.java:159)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
	... 3 common frames omitted
Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [com.example.virgo-ehcache-rmi] (no security manager: RMI class loader disabled)
	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
	at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
	at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
	at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1574)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	... 12 common frames omitted
Caused by: org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub in KernelBundleClassLoader: [bundle=com.example.virgo-ehcache-rmi_0.0.1]
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:138)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
	at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99)
	at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:247)
	at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:359)
	... 21 common frames omitted
Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:134)
	... 31 common frames omitted
Comment 12 Glyn Normington CLA 2011-05-25 10:14:40 EDT
Note also that the new diagnostics seem to point in the right direction as importing the missing package net.sf.ehcache.distribution into com.example.virgo-ehcahe-rmi
v0.0.1 allows the bundle to start:

[2011-05-25 15:12:23.457] fs-watcher                   <HD0001I> Hot deployer processing 'INITIAL' event for file 'virgo-ehcache-rmi-0.0.1.jar'. 
[2011-05-25 15:12:23.522] fs-watcher                   <DE0000I> Installing bundle 'com.example.virgo-ehcache-rmi' version '0.0.1'. 
[2011-05-25 15:12:23.552] fs-watcher                   <DE0001I> Installed bundle 'com.example.virgo-ehcache-rmi' version '0.0.1'. 
[2011-05-25 15:12:23.563] fs-watcher                   <DE0004I> Starting bundle 'com.example.virgo-ehcache-rmi' version '0.0.1'. 
[2011-05-25 15:12:24.028] start-signalling-2           <DE0005I> Started bundle 'com.example.virgo-ehcache-rmi' version '0.0.1'.
Comment 13 Glyn Normington CLA 2011-05-25 10:33:18 EDT
Fixed in kernel commit 6adb92b7ec25c10df4317d77c7f94b42903a7c22