3 Replies Latest reply on May 30, 2017 6:16 AM by Grzegorz Grzybek

    ActiveMQ - bundle wiring for org.apache.activemq.activemq-osgi is no longer valid.

    Jayashankar C Newbie

      We are using Jboss Fuse 6.3 and Fabric8 container

       

      Broker configuration

      Bean xml file in the attachment.

      URL: failover:(tcp://ip1:port,tcp://ip1:port)?randomize=false

       

      Refereed below bug and applied workaround but still facing the same issue.

      [ENTESB-5948] ActiveMQConnection Disconnect Invalidates Wiring For activemq-osgi Bundle  - JBoss Issue Tracker

       

      Added below in POM

      <Import-Package>*,org.apache.activemq.transport.failover,org.apache.activemq.util,org.apache.activemq.*</Import-Package>

       

      Changed bundle start level 100 by using Karaf Features and sample below:

      <features>

        <repository>mvn:org.apache.activemq/activemq-karaf/5.11.0.redhat-630187/xml/features</repository>

        <feature name='bundle-name' version='${project.version}'>

        <feature>activemq-camel</feature>

        <feature>camel-jms</feature>

        <!-- we should start last -->

        <bundle start-level="100">mvn:repo</bundle>

        </feature>

      </features>

       

      After doing all above, ended getting below error.

      2017-05-30 10:25:29,934 | ERROR | ActiveMQ Task-3  | TaskRunnerFactory                | 168 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630187 | 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:1012)[168:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]

              at org.apache.activemq.transport.failover.FailoverTransport$2.iterate(FailoverTransport.java:147)[168:org.apache.activemq.activemq-osgi:5.11.0.redhat-630187]

              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:1142)[:1.8.0_102]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_102]

              at java.lang.Thread.run(Thread.java:745)[:1.8.0_102]

      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:357)[:1.8.0_102]

       

      Further, added below and still error

      <Import-Package>*,org.apache.activemq.util.IOExceptionSupport,org.apache.activemq.transport.failover,org.apache.activemq.util,org.apache.activemq.*</Import-Package>

       

      osgi.wiring.package; filter:="(osgi.wiring.package=org.apache.activemq.util.IOExceptionSupport)"]]

              at org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:236)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:159)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at io.fabric8.agent.region.SubsystemResolver.resolve(SubsystemResolver.java:190)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at io.fabric8.agent.service.Deployer.deploy(Deployer.java:273)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at io.fabric8.agent.service.Agent.provision(Agent.java:366)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at io.fabric8.agent.service.Agent.provision(Agent.java:199)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:753)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at io.fabric8.agent.DeploymentAgent$4.run(DeploymentAgent.java:303)[86:io.fabric8.fabric-agent:1.2.0.redhat-630187]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_102]

              at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_102]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_102]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_102]

              at java.lang.Thread.run(Thread.java:745)[:1.8.0_102]

       

      This is reproducible,

      1. Two ActiveMQ bundle which are created as two profiles

      2. Added those profiles to the container (will observe container reloads all the profiles by added two new once as well)

      3. Remove one of the profile from the container, when it again reloads we end up with this error (java.lang.NoClassDefFoundError: org/apache/activemq/util/IOExceptionSupport)

       

      Please do support us in fixing this issue.

      grgrzybek - seeking your help as well.