Uploaded image for project: 'ServiceMix'
  1. ServiceMix
  2. SM-1958

ServiceMix 3 doesn't start correctly due to NoClassDefFoundError on ActiveMQ bean

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4.0
    • Component/s: servicemix-assembly
    • Labels:
      None
    • Environment:

      Linux Debian 5.4
      Apache ServiceMix 3.3.3-SNAPSHOT
      Java SUN SDK 1.5.0_16

      Description

      Just after building ServiceMix 3.3.3-SNAPSHOT, taking the tarball in distribution target, I got the following at startup:

      Starting Apache ServiceMix ESB: 3.3.3-SNAPSHOT

      Loading Apache ServiceMix from servicemix.xml on the CLASSPATH
      Caught: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in class path resource [activemq.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.activemq.xbean.XBeanBrokerService]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/osgi/framework/BundleException
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker' defined in class path resource [activemq.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.activemq.xbean.XBeanBrokerService]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/osgi/framework/BundleException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:254)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
      at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:161)
      at org.apache.xbean.spring.context.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:51)
      at org.apache.servicemix.Main.main(Main.java:53)
      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.codehaus.classworlds.Launcher.launchStandard(Launcher.java:353)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:264)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.activemq.xbean.XBeanBrokerService]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/osgi/framework/BundleException
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
      ... 30 more
      Caused by: java.lang.NoClassDefFoundError: org/osgi/framework/BundleException
      at org.apache.activemq.xbean.XBeanBrokerService.<init>(XBeanBrokerService.java:57)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
      at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
      ... 32 more

        Activity

        Hide
        jb@nanthrax.net Jean-Baptiste Onofré added a comment -

        Mail sent to ActiveMQ dev list.

        Show
        jb@nanthrax.net Jean-Baptiste Onofré added a comment - Mail sent to ActiveMQ dev list.
        Hide
        jb@nanthrax.net Jean-Baptiste Onofré added a comment -

        A bug is already raised on ActiveMQ:
        https://issues.apache.org/activemq/browse/AMQ-2574

        I'm gonna submit a patch in this Jira task.

        Show
        jb@nanthrax.net Jean-Baptiste Onofré added a comment - A bug is already raised on ActiveMQ: https://issues.apache.org/activemq/browse/AMQ-2574 I'm gonna submit a patch in this Jira task.
        Hide
        jb@nanthrax.net Jean-Baptiste Onofré added a comment -

        Dejan has fixed the issue in ActiveMQ 5.4-SNAPSHOT.
        As ActiveMQ 5.4.0 is scheduled soon, I'm gonna update SMX3 to use ActiveMQ 5.4.

        Show
        jb@nanthrax.net Jean-Baptiste Onofré added a comment - Dejan has fixed the issue in ActiveMQ 5.4-SNAPSHOT. As ActiveMQ 5.4.0 is scheduled soon, I'm gonna update SMX3 to use ActiveMQ 5.4.
        Hide
        jb@nanthrax.net Jean-Baptiste Onofré added a comment -

        ActiveMQ 5.4-SNAPSHOT now uses KahaDB as default backend. I add KahaDB dependency in ServiceMix 3.

        Show
        jb@nanthrax.net Jean-Baptiste Onofré added a comment - ActiveMQ 5.4-SNAPSHOT now uses KahaDB as default backend. I add KahaDB dependency in ServiceMix 3.
        Hide
        jb@nanthrax.net Jean-Baptiste Onofré added a comment -

        Revision 965448.

        Show
        jb@nanthrax.net Jean-Baptiste Onofré added a comment - Revision 965448.

          People

          • Assignee:
            jb@nanthrax.net Jean-Baptiste Onofré
            Reporter:
            jb@nanthrax.net Jean-Baptiste Onofré
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development