1 Reply Latest reply on Apr 11, 2010 10:55 PM by Willem Jiang

    activemq osgi - no working example

    cool hot Newbie

      I can run camel in osgi fine, but when I add activemq component or broker to my spring, I get the exceptions mentioned at the end.

       

      I followed this advice to no avail:

      https://issues.apache.org/activemq/browse/CAMEL-2161

       

      I'm using 4.2.0-fuse.  Please help!

       

      FROM KARAF:

      Exception in thread "SpringOsgiExtenderThread-85" java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

           at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:153)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.close(DependencyWaiterApplicationContextExecutor.java:345)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.fail(DependencyWaiterApplicationContextExecutor.java:401)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:287)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)

           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)

           at java.lang.Thread.run(Thread.java:637)

       

       

      FROM LOG:

      Caused by: java.lang.ClassNotFoundException: org.apache.activemq.xbean.XBeanBrokerService

           at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)

           at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)

           at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)

           at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:250)

           at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass(XBeanQNameHelper.java:107)

           at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo(XBeanQNameHelper.java:72)

           ... 31 more