0 Replies Latest reply on May 25, 2010 3:15 AM by Marcel Casado

    How  get activemq http transport conn. (activemq-optional) working in  osgi

    Marcel Casado Novice

      When adding an http transport connector in activemq I got :

       

      karaf@root> Exception in thread "SpringOsgiExtenderThread-6" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in URL bundleentry://121.fwk2133512606/META-INF/spring/activemq-broker.xml: Invocation of init method failed; nested exception is java.io.IOException: Transport Connector could not be registered in JMX: Transport scheme NOT recognized:

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

           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.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

           at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:355)

           at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)

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

      Caused by: java.io.IOException: Transport Connector could not be registered in JMX: Transport scheme NOT recognized:

           at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)

           at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1569)

           at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:1990)

           at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1943)

           at org.apache.activemq.broker.BrokerService.start(BrokerService.java:481)

           at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:61)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)

           at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)

           ... 17 more

      Caused by: java.io.IOException: Transport scheme NOT recognized:

           at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)

           at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:204)

           at org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:123)

           at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:304)

           at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:133)

           at org.apache.activemq.broker.TransportConnector.asManagedConnector(TransportConnector.java:96)

           at org.apache.activemq.broker.BrokerService.registerConnectorMBean(BrokerService.java:1564)

           ... 23 more

      Caused by: java.io.IOException: Could not find factory class for resource: META-INF/services/org/apache/activemq/transport/http

           at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.loadProperties(FactoryFinder.java:96)

           at org.apache.activemq.util.FactoryFinder$StandaloneObjectFactory.create(FactoryFinder.java:58)

           at org.apache.activemq.util.FactoryFinder.newInstance(FactoryFinder.java:146)

           at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:201)

           ... 28 more

       

       

      Seems that activemq-optional is not osgi ready.

       

      -Thanks.

       

      -Marcel