Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-5948

ActiveMQConnection Disconnect Invalidates Wiring For activemq-osgi Bundle

    XMLWordPrintable

Details

    • % %

    Description

      A Camel route is deployed across a fabric and communicates with a master-slave broker cluster on that fabric. The route uses the discovery fabric transport to connect to the master broker. The master broker disconnects the connection to the route due to the following InactivityIOException, which is reflected on the broker side logs.

      Transport Connection to: tcp://xx.xx.xx.x:43787 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>30000) long: tcp://xx.xx.xx.xx:43787
      

      When the above occurs, the client-side FailoverTransport goes into reconnect mode; however, when doing so it encounters a ClassNotFoundException as follows:

      2016-08-02 11:21:11,797 | WARN  | .232:61616@35580 | FailoverTransport                | 119 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621090 | Transport (tcp://nodcrsamqp3:61616) failed, attempting to automatically reconnect
      java.io.IOException: Unexpected error occurred: java.lang.NoClassDefFoundError: org/apache/activemq/command/DestinationInfo
              at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:203)[119:org.apache.activemq.activemq-osgi:5.11.0.redhat-621090]
              at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
      Caused by: java.lang.NoClassDefFoundError: org/apache/activemq/command/DestinationInfo
              at org.apache.activemq.openwire.v10.DestinationInfoMarshaller.createObject(DestinationInfoMarshaller.java:55)
              at org.apache.activemq.openwire.OpenWireFormat.tightUnmarshalNestedObject(OpenWireFormat.java:429)
              at org.apache.activemq.openwire.v10.BaseDataStreamMarshaller.tightUnmarsalNestedObject(BaseDataStreamMarshaller.java:125)
              at org.apache.activemq.openwire.v10.MessageMarshaller.tightUnmarshal(MessageMarshaller.java:74)
              at org.apache.activemq.openwire.v10.ActiveMQMessageMarshaller.tightUnmarshal(ActiveMQMessageMarshaller.java:66)
              at org.apache.activemq.openwire.OpenWireFormat.tightUnmarshalNestedObject(OpenWireFormat.java:445)
              at org.apache.activemq.openwire.v10.BaseDataStreamMarshaller.tightUnmarsalNestedObject(BaseDataStreamMarshaller.java:125)
              at org.apache.activemq.openwire.v10.MessageDispatchMarshaller.tightUnmarshal(MessageDispatchMarshaller.java:71)
              at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:354)
              at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:268)
              at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:221)[119:org.apache.activemq.activemq-osgi:5.11.0.redhat-621090]
              at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:213)[119:org.apache.activemq.activemq-osgi:5.11.0.redhat-621090]
              at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)[119:org.apache.activemq.activemq-osgi:5.11.0.redhat-621090]
              ... 1 more
      Caused by: java.lang.ClassNotFoundException: Unable to load class 'org.apache.activemq.command.DestinationInfo' because the bundle wiring for org.apache.activemq.activemq-osgi is no longer valid.
              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1521)[org.apache.felix.framework-4.4.1.jar:]
              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)[org.apache.felix.framework-4.4.1.jar:]
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)[org.apache.felix.framework-4.4.1.jar:]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_79]
      

      And then the logs fill up with the following:

      2016-08-02 11:21:11,819 | ERROR | ActiveMQ Task-3  | TaskRunnerFactory                | 119 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621090 | Error in thread 'ActiveMQ Task-3'
      java.lang.NoClassDefFoundError: org/apache/activemq/util/IOExceptionSupport
              at org.apache.activemq.transport.TransportFactory.createWireFormatFactory(TransportFactory.java:205)
              at org.apache.activemq.transport.TransportFactory.createWireFormat(TransportFactory.java:189)
              at org.apache.activemq.transport.TransportFactory.doCompositeConnect(TransportFactory.java:134)
              at org.apache.activemq.transport.TransportFactory.compositeConnect(TransportFactory.java:91)
              at org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:1029)
              at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:149)
              at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133)
              at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_79]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_79]
              at java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
      Caused by: java.lang.ClassNotFoundException: Unable to load class 'org.apache.activemq.util.IOExceptionSupport' because the bundle wiring for org.apache.activemq.activemq-osgi is no longer valid.
              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1521)[org.apache.felix.framework-4.4.1.jar:]
              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)[org.apache.felix.framework-4.4.1.jar:]
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1993)[org.apache.felix.framework-4.4.1.jar:]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_79]
              ... 11 more
      

      It is very odd that the classes that cannot be found are in the same bundle reporting the problem. I don't think a disconnect like this should negatively affect the underlying bundle's wiring. In this particular case, the problem seems to follow the Smooks OSGi bundle. The problem occurs only when that bundle is provisioned and used in conjunction with other bundles.

      Attachments

        1. fuse.log.gz
          802 kB
        2. sample1.xml
          2 kB
        3. sample2.xml
          31 kB

        Issue Links

          Activity

            People

              rhn-support-kboone Kevin Boone
              Argo_Integration Travis North (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: