dm Server
  1. dm Server
  2. DMS-2491

Cannot export more than one service through RMI: NotSerializableException: c.s.k.u.i.e.KernelBundleClassLoader

    Details

    • Type: Defect Defect
    • Status: Done Done
    • Priority: Blocker Blocker
    • Resolution: Complete
    • Affects Version/s: 2.0.1.RELEASE
    • Fix Version/s: Sprint 28
    • Component/s: None
    • Labels:
      None
    • Environment:

      ubuntu 9.04

      Description

      I want to upgrade my application which was running on dm Server 1.0.2. One of the applications bundles exports several services to rmi via spring.

      No the upgrade is blocking because this is not working on my dm Server 2.0.1. With a little bit trying and
      playing around i realised, that the failure occurs just when more than one service is exported.

      Attached is a small application containing two bundels packaged in a par.

      When i start the server, while starting the bundle which exports the services, i get the following trace:

      ...
      [2010-04-28 11:13:43.603] Thread-2 <UR0001I> User region ready.
      [2010-04-28 11:13:44.693] TCP Connection(2)-127.0.0.1 <DE0000I> Installing par 'com.not.exists.server.par' version '1.0.0'.
      [2010-04-28 11:13:44.699] TCP Connection(2)-127.0.0.1 <DE0000I> Installing bundle 'com.not.exists.server.par-1-com.not.exists.server.service' version '1.0.0'.
      [2010-04-28 11:13:44.705] TCP Connection(2)-127.0.0.1 <DE0000I> Installing bundle 'com.not.exists.server.par-1-com.not.exists.service' version '1.0.0'.
      [2010-04-28 11:13:44.773] TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'com.not.exists.server.par-1-com.not.exists.server.service' version '1.0.0'.
      [2010-04-28 11:13:44.778] TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'com.not.exists.server.par-1-com.not.exists.service' version '1.0.0'.
      [2010-04-28 11:13:44.782] TCP Connection(2)-127.0.0.1 <DE0001I> Installed bundle 'com.not.exists.server.par-1-synthetic.context' version '1.0.0'.
      [2010-04-28 11:13:44.786] TCP Connection(2)-127.0.0.1 <DE0001I> Installed par 'com.not.exists.server.par' version '1.0.0'.
      [2010-04-28 11:13:44.804] TCP Connection(2)-127.0.0.1 <DE0004I> Starting par 'com.not.exists.server.par' version '1.0.0'.
      [2010-04-28 11:13:44.809] TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'com.not.exists.server.par-1-com.not.exists.server.service' version '1.0.0'.
      [2010-04-28 11:13:44.829] TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'com.not.exists.server.par-1-com.not.exists.service' version '1.0.0'.
      [2010-04-28 11:13:44.855] start-signalling-1 <DE0005I> Started bundle 'com.not.exists.server.par-1-com.not.exists.service' version '1.0.0'.
      [2010-04-28 11:13:44.869] TCP Connection(2)-127.0.0.1 <DE0004I> Starting bundle 'com.not.exists.server.par-1-synthetic.context' version '1.0.0'.
      [2010-04-28 11:13:44.874] start-signalling-1 <DE0005I> Started bundle 'com.not.exists.server.par-1-synthetic.context' version '1.0.0'.
      [2010-04-28 11:13:45.128] Thread-3 <AG0000E> Application context creation failure for bundle 'com.not.exists.server.par-1-com.not.exists.server.service' version '1.0.0'. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#1' defined in URL [bundleentry://42.fwk6391091/META-INF/spring/context.xml]: Invocation of init method failed; nested exception is java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
      java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.springsource.kernel.userregion.internal.equinox.KernelBundleClassLoader
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
      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:563)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
      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 com.springsource.kernel.agent.dm.ContextPropagatingTaskExecutor$2.run(ContextPropagatingTaskExecutor.java:106)
      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:619)
      Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
      java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.springsource.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 org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:286)
      at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:227)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1469)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
      ... 17 common frames omitted
      Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.springsource.kernel.userregion.internal.equinox.KernelBundleClassLoader
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
      at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
      at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:225)
      ... 23 common frames omitted
      Caused by: java.io.NotSerializableException: com.springsource.kernel.userregion.internal.equinox.KernelBundleClassLoader
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)
      at java.lang.Throwable.writeObject(Throwable.java:648)
      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:597)
      at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
      at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
      at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
      at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
      at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
      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

        Activity

          People

          • Assignee:
            Chris Frost [X] (Inactive)
            Reporter:
            Rico Besson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              First Response Date:

              Time Tracking

              Estimated:
              Original Estimate - 12h
              12h
              Remaining:
              Remaining Estimate - 0h
              0h
              Logged:
              Time Spent - 9h 5m Time Not Required
              9h 5m