activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dragan Kocovski (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMQ-5329) When hot deploying ActiveMQ into Karaf using features.xml NoClassDefFoundError is thrown sometimes
Date Fri, 22 Aug 2014 02:25:12 GMT

     [ https://issues.apache.org/jira/browse/AMQ-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dragan Kocovski updated AMQ-5329:
---------------------------------

    Description: 
We see the following exception being thrown occasionally when provisioning Activemq (within
Karaf 3.0.1) using the activemq feature.xml 

We are using leveldb, (activemq.xml file contains)
{code}
        <persistenceAdapter>
            <levelDB directory="${karaf.data}/${broker-name}/leveldb"/>
        </persistenceAdapter>
{code}


{code}
5.10.0]: Updating configuration org.apache.activemq.server.5a2421aa-fba5-4028-9c82-791b1fdcf7bb
caused a problem: Cannot start the broker
org.osgi.service.cm.ConfigurationException: null : Cannot start the broker
        at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:110)[154:org.apache.activemq.activemq-osgi:5.10.0]
        at Proxyf220b794_1959_4a1c_bb8a_4abe92a323a7.updated(Unknown Source)[:]
        at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:88)[10:org.apache.felix.configadmin:1.6.0]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1593)[10:org.apache.felix.configadmin:1.6.0]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1536)[10:org.apache.felix.configadmin:1.6.0]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[10:org.apache.felix.configadmin:1.6.0]
        at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception
parsing XML document from file [/opt/apache-karaf/etc/org.apache.activemq.xml]; nested exception
is java.lang.NoClassDefFoundError: scala/collection/Seq
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)[137:org.springframework.beans:3.2.4.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[137:org.springframework.beans:3.2.4.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[137:org.springframework.beans:3.2.4.RELEASE]
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)[153:org.apache.xbean.spring:3.16.0]
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)[153:org.apache.xbean.spring:3.16.0]
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[139:org.springframework.context:3.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[139:org.springframework.context:3.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[139:org.springframework.context:3.2.4.RELEASE]
        at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:90)[154:org.apache.activemq.activemq-osgi:5.10.0]
        ... 6 more
Caused by: java.lang.NoClassDefFoundError: scala/collection/Seq
{code}

Appears to be a race condition when provisioning the feature.xml, a dependent activemq bundle
cannot see the scala library in its classpath.

We patched our local activemq  feature.xml with below, and the problem went away.

{code}
<feature name="activemq-client" description="ActiveMQ client libraries" version="5.10.0"
            resolver="(obr)"
            start-level="50">
      <feature version="[3.1,4)">spring</feature>
      <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
      <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
      <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
      <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
      <bundle dependency="true">mvn:org.jvnet.jaxb2_commons/jaxb2-basics-runtime/0.6.4</bundle>
      <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.1.1_2</bundle>
      <bundle dependency="false">mvn:commons-pool/commons-pool/1.6</bundle>
      <bundle dependency="false">mvn:commons-net/commons-net/3.3</bundle>
      <bundle dependency="true">mvn:org.apache.zookeeper/zookeeper/3.4.5</bundle>
      <!-- uber osgi bundle means client is not that lean, todo: introduce client osgi
bundle -->
      <bundle dependency="false">mvn:org.apache.xbean/xbean-spring/3.16</bundle>
      <bundle dependency="true">mvn:org.scala-lang/scala-library/2.11.0</bundle>
      <bundle>mvn:org.apache.activemq/activemq-osgi/5.10.0</bundle>
</feature>
{code}


 



  was:
We see the following exception being thrown occasionally when provisioning Activemq (within
Karaf 3.0.1) using the activemq feature.xml 

We are using leveldb, (activemq.xml file contains)
{code}
        <persistenceAdapter>
            <levelDB directory="${karaf.data}/${broker-name}/leveldb"/>
        </persistenceAdapter>
{code}


{code}
5.10.0]: Updating configuration org.apache.activemq.server.5a2421aa-fba5-4028-9c82-791b1fdcf7bb
caused a problem: Cannot start the broker
org.osgi.service.cm.ConfigurationException: null : Cannot start the broker
        at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:110)[154:org.apache.activemq.activemq-osgi:5.10.0]
        at Proxyf220b794_1959_4a1c_bb8a_4abe92a323a7.updated(Unknown Source)[:]
        at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:88)[10:org.apache.felix.configadmin:1.6.0]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1593)[10:org.apache.felix.configadmin:1.6.0]
        at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1536)[10:org.apache.felix.configadmin:1.6.0]
        at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[10:org.apache.felix.configadmin:1.6.0]
        at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception
parsing XML document from file [/opt/apache-karaf/etc/org.apache.activemq.xml]; nested exception
is java.lang.NoClassDefFoundError: scala/collection/Seq
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)[137:org.springframework.beans:3.2.4.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[137:org.springframework.beans:3.2.4.RELEASE]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[137:org.springframework.beans:3.2.4.RELEASE]
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)[153:org.apache.xbean.spring:3.16.0]
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)[153:org.apache.xbean.spring:3.16.0]
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[139:org.springframework.context:3.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[139:org.springframework.context:3.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[139:org.springframework.context:3.2.4.RELEASE]
        at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:90)[154:org.apache.activemq.activemq-osgi:5.10.0]
        ... 6 more
Caused by: java.lang.NoClassDefFoundError: scala/collection/Seq
{code}

Appears to be a race condition when provisioning the feature.xml, a dependent activemq bundle
cannot see the scala library in its classpath.

We patched our local activemq  feature.xml with below, and the problem went away.

{code}
<feature name="activemq" description="ActiveMQ broker libraries" version="5.10.0"
            resolver="(obr)"
            start-level="50">
      <feature>http</feature>
      <feature version="5.10.0">activemq-client</feature>
      ... 
      <bundle start-level="40" dependency="true">mvn:org.scala-lang/scala-library/2.11.0</bundle>
</feature>
{code}


 




> When hot deploying ActiveMQ into Karaf using features.xml NoClassDefFoundError is thrown
sometimes
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-5329
>                 URL: https://issues.apache.org/jira/browse/AMQ-5329
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: OSGi/Karaf
>    Affects Versions: 5.10.0
>            Reporter: Dragan Kocovski
>
> We see the following exception being thrown occasionally when provisioning Activemq (within
Karaf 3.0.1) using the activemq feature.xml 
> We are using leveldb, (activemq.xml file contains)
> {code}
>         <persistenceAdapter>
>             <levelDB directory="${karaf.data}/${broker-name}/leveldb"/>
>         </persistenceAdapter>
> {code}
> {code}
> 5.10.0]: Updating configuration org.apache.activemq.server.5a2421aa-fba5-4028-9c82-791b1fdcf7bb
caused a problem: Cannot start the broker
> org.osgi.service.cm.ConfigurationException: null : Cannot start the broker
>         at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:110)[154:org.apache.activemq.activemq-osgi:5.10.0]
>         at Proxyf220b794_1959_4a1c_bb8a_4abe92a323a7.updated(Unknown Source)[:]
>         at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:88)[10:org.apache.felix.configadmin:1.6.0]
>         at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1593)[10:org.apache.felix.configadmin:1.6.0]
>         at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1536)[10:org.apache.felix.configadmin:1.6.0]
>         at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[10:org.apache.felix.configadmin:1.6.0]
>         at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
> Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from file [/opt/apache-karaf/etc/org.apache.activemq.xml];
nested exception is java.lang.NoClassDefFoundError: scala/collection/Seq
>         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)[137:org.springframework.beans:3.2.4.RELEASE]
>         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[137:org.springframework.beans:3.2.4.RELEASE]
>         at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[137:org.springframework.beans:3.2.4.RELEASE]
>         at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:111)[153:org.apache.xbean.spring:3.16.0]
>         at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions(ResourceXmlApplicationContext.java:104)[153:org.apache.xbean.spring:3.16.0]
>         at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[139:org.springframework.context:3.2.4.RELEASE]
>         at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[139:org.springframework.context:3.2.4.RELEASE]
>         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[139:org.springframework.context:3.2.4.RELEASE]
>         at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:90)[154:org.apache.activemq.activemq-osgi:5.10.0]
>         ... 6 more
> Caused by: java.lang.NoClassDefFoundError: scala/collection/Seq
> {code}
> Appears to be a race condition when provisioning the feature.xml, a dependent activemq
bundle cannot see the scala library in its classpath.
> We patched our local activemq  feature.xml with below, and the problem went away.
> {code}
> <feature name="activemq-client" description="ActiveMQ client libraries" version="5.10.0"
>             resolver="(obr)"
>             start-level="50">
>       <feature version="[3.1,4)">spring</feature>
>       <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
>       <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
>       <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
>       <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
>       <bundle dependency="true">mvn:org.jvnet.jaxb2_commons/jaxb2-basics-runtime/0.6.4</bundle>
>       <bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxb-impl/2.2.1.1_2</bundle>
>       <bundle dependency="false">mvn:commons-pool/commons-pool/1.6</bundle>
>       <bundle dependency="false">mvn:commons-net/commons-net/3.3</bundle>
>       <bundle dependency="true">mvn:org.apache.zookeeper/zookeeper/3.4.5</bundle>
>       <!-- uber osgi bundle means client is not that lean, todo: introduce client
osgi bundle -->
>       <bundle dependency="false">mvn:org.apache.xbean/xbean-spring/3.16</bundle>
>       <bundle dependency="true">mvn:org.scala-lang/scala-library/2.11.0</bundle>
>       <bundle>mvn:org.apache.activemq/activemq-osgi/5.10.0</bundle>
> </feature>
> {code}
>  



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message