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] [Created] (AMQ-5329) When hot deploying ActiveMQ into Karaf using features.xml NoClassDefFoundError is thrown sometimes
Date Fri, 22 Aug 2014 02:01:12 GMT
Dragan Kocovski created AMQ-5329:
------------------------------------

             Summary: 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) occasionally 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}


 





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

Mime
View raw message