2 Replies Latest reply on Apr 7, 2007 6:22 PM by Chip Schoch

    Marshalling Exception

    Chip Schoch Novice

      JBossAS 4.0.5.GA and JBossMessaging 1.2.0.GA

      I get client exception:

      [2007-04-06 09:37:09,000] ERROR - Got marshalling exception, exiting
      java.io.EOFException
       at java.io.DataInputStream.readInt(Unknown Source)
       at org.jboss.jms.server.remoting.JMSWireFormat.read(JMSWireFormat.java:297)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:936)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:579)
       at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:269)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.LeasePinger.sendClientPing(LeasePinger.java:283)
       at org.jboss.remoting.LeasePinger.addClient(LeasePinger.java:117)
       at org.jboss.remoting.MicroRemoteClientInvoker.establishLease(MicroRemoteClientInvoker.java:398)
       at org.jboss.remoting.Client.setupClientLease(Client.java:1504)
       at org.jboss.remoting.Client.connect(Client.java:1404)
       at org.jboss.remoting.Client.connect(Client.java:441)
       at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMSRemotingConnection.java:271)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:146)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
       at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:83)
       at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
       at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
       at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_4579211046834694258.java)
       at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
       at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:212)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:88)
       at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:83)
       at com.eLynx.Messaging.MessageSender.initialize(MessageSender.java:144)
       at com.eLynx.Messaging.MessageSender.<init>(MessageSender.java:86)
       at com.eLynx.Imaging.USignContainerImager.<init>(USignContainerImager.java:96)
       at com.eLynx.Test.TestUsnProcessing.execute(TestUsnProcessing.java:140)
       at com.eLynx.Test.TestUsnProcessing.main(TestUsnProcessing.java:69)
      [2007-04-06 09:37:09,000] WARN - LeasePinger[SocketClientInvoker[1735602, bisocket://192.168.1.115:4457](5c4o137-ymrrtl-f06omnbl-1-f06ompil-5)] failed to ping to server: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is:
       java.io.EOFException
      


      And server exception:

      2007-04-06 09:37:29,015 ERROR [org.jboss.remoting.transport.socket.ServerThread] Worker thread initialization failure
      java.io.IOException: cannot assign instance of [LEDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Segment; to field EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.segments of type [LEDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap$Segment; in instance of EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap
       at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2004)
       at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1184)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1914)
       at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:479)
       at EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1207)
       at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
       at org.jboss.jms.wireformat.SerializedPacket.read(SerializedPacket.java:72)
       at org.jboss.jms.server.remoting.JMSWireFormat.read(JMSWireFormat.java:307)
       at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:641)
       at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:523)
       at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:363)
       at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:159)
      


      Any Ideas?

      Thanks

        • 1. Re: Marshalling Exception
          Chip Schoch Novice

          Upgrading to 1.2.0.sp1 seems to have taken care of the problem. If my service sar is deployed when I start JBossAS then it runs fine, however if I redeploy it I get the following:

          2007-04-06 15:11:53,937 ERROR [STDERR] Exception in thread "Thread-38"
          2007-04-06 15:11:53,937 ERROR [STDERR] java.lang.LinkageError: loader constraints violated when linking org/jboss/aop/ClassAdvisor class
          2007-04-06 15:11:53,937 ERROR [STDERR] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.<clinit>(ClientConnectionFactoryDelegate.java)
          2007-04-06 15:11:53,937 ERROR [STDERR] at sun.misc.Unsafe.ensureClassInitialized(Native Method)
          2007-04-06 15:11:53,937 ERROR [STDERR] at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
          2007-04-06 15:11:53,937 ERROR [STDERR] at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.lang.reflect.Field.acquireFieldAccessor(Field.java:917)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.lang.reflect.Field.getFieldAccessor(Field.java:898)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.lang.reflect.Field.getLong(Field.java:527)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1586)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:52)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:408)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.security.AccessController.doPrivileged(Native Method)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:400)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:297)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:531)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1552)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
          2007-04-06 15:11:53,937 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
          2007-04-06 15:11:53,984 ERROR [STDERR] at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
          2007-04-06 15:11:53,984 ERROR [STDERR] at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
          2007-04-06 15:11:53,984 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:652)
          2007-04-06 15:11:53,984 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
          2007-04-06 15:11:53,984 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
          2007-04-06 15:11:53,984 ERROR [STDERR] at com.eLynx.Messaging.MessageReceiver.run(MessageReceiver.java:546)


          The code is trying to lookup QueueConnectionFactory in JNDI. I am not sure what to do about this.

          • 2. Re: Marshalling Exception
            Chip Schoch Novice

            A little more info.

            When I start JBossAS and my .sar that uses JBossMessaging is in the deploy directory everything starts and works correctly. Then if I undeploy it I get the following when the JMSConnection.close() is called:

            java.lang.NullPointerException
             at org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
             at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
             at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
             at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
             at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
             at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:215)
             at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:200)
             at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:155)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate.org$jboss$jms$client$delegate$ClientConnectionDelegate$close$aop(ClientConnectionDelegate.java:151)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$close_N4742752445160157748.invokeNext(ClientConnectionDelegate$close_N4742752445160157748.java)
             at org.jboss.jms.client.container.ConnectionAspect.handleClose(ConnectionAspect.java:166)
             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:585)
             at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$close_N4742752445160157748.invokeNext(ClientConnectionDelegate$close_N4742752445160157748.java)
             at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:91)
             at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$close_N4742752445160157748.invokeNext(ClientConnectionDelegate$close_N4742752445160157748.java)
             at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:171)
             at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$close_N4742752445160157748.invokeNext(ClientConnectionDelegate$close_N4742752445160157748.java)
             at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:71)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$close_N4742752445160157748.invokeNext(ClientConnectionDelegate$close_N4742752445160157748.java)
             at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate$close_N4742752445160157748.invokeNext(ClientConnectionDelegate$close_N4742752445160157748.java)
             at org.jboss.jms.client.delegate.ClientConnectionDelegate.close(ClientConnectionDelegate.java)
             at org.jboss.jms.client.JBossConnection.close(JBossConnection.java:132)
             at com.eLynx.Messaging.MessageReceiver.run(MessageReceiver.java:609)


            I am pretty much stumped so any help would really be appreciated.