5 Replies Latest reply on Oct 1, 2010 8:44 AM by Aaron Riekenberg

    camel and blueprint

    Aaron Riekenberg Newbie

      I am experimenting with camel support for OSGi blueprint in FUSE ESB 4.3.0-fuse-01-00.  I am having the following issues, and am wondering if camel blueprint support is intended to work in this version of FUSE ESB.

       

      1. I added camel-blueprint to the featuresBoot line in etc/org.apache.karaf.features.cfg.  After doing this I get several exceptions in the servicemix.log related to jmx (pasted below).

       

      Bundle 118 in my container is mvn:org.apache.aries.blueprint/org.apache.aries.blueprint/0.1-incubating.  This bundle is being loaded because the camel-blueprint feature includes it.

       

      I wonder if this is happening because a different version of org.apache.aires.blueprint (0.1-r96470) is already being loaded by startup.properties?

       

      2. I tried a simple test of creating a bean named Producer that has a ProducerTemplate injected by @EndpointInject:

       

           @EndpointInject(ref = "testEndpoint")

           private ProducerTemplate testEndpoint = null;

       

      I initialize this bean using blueprint and create a camel context using blueprint (see below).  The problem is the testEndpoint is never being injected by the @EndpointInject annotation.  testEndpoint remains null in the code so if I try to do testEndpoint.sendBody it throws a NullPointerException.

       

      This same thing works perfectly with Spring DM.  Is this supposed to work with blueprint?

       

      )

              at org.apache.karaf.management.MBeanRegistrer.registerMBeans(MBeanRegistrer.java:56)

              at org.apache.karaf.management.MBeanRegistrer.registerMBeanServer(MBeanRegistrer.java:40)

              ... 26 more

       

       

      06:45:13,400 | ERROR | JMX OSGi Agent   | jmx                              | ?                                   ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | MBean is already registered

      javax.management.InstanceAlreadyExistsException: osgi.compendium:service=cm,version=1.3

              at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)[:1.6.0_21]

              at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_21]

              at org.apache.aries.jmx.agent.JMXAgentImpl.registerMBeans(JMXAgentImpl.java:129)[31:org.apache.aries.jmx:0.1.0.r964701]

              at org.apache.aries.jmx.agent.JMXAgentContext.registerMBeans(JMXAgentContext.java:58)[31:org.apache.aries.jmx:0.1.0.r964701]

              at org.apache.aries.jmx.MBeanServiceTracker$1.run(MBeanServiceTracker.java:61)[31:org.apache.aries.jmx:0.1.0.r964701]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

              at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

       

       

       

      06:45:13,403 | ERROR | JMX OSGi Agent   | jmx                              | ?                                   ? | 31 - org.apache.aries.jmx - 0.1.0.r964701 | MBean is already registered

      javax.management.InstanceAlreadyExistsException: osgi.core:service=permissionadmin,version=1.2

              at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)[:1.6.0_21]

              at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_21]

              at org.apache.aries.jmx.agent.JMXAgentImpl.registerMBeans(JMXAgentImpl.java:129)[31:org.apache.aries.jmx:0.1.0.r964701]

              at org.apache.aries.jmx.agent.JMXAgentContext.registerMBeans(JMXAgentContext.java:58)[31:org.apache.aries.jmx:0.1.0.r964701]

              at org.apache.aries.jmx.MBeanServiceTracker$1.run(MBeanServiceTracker.java:61)[31:org.apache.aries.jmx:0.1.0.r964701]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

              at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

       

      06:45:13,415 | ERROR | rint Extender: 2 | BlueprintContainerImpl           | container.BlueprintContainerImpl  342 | 118 - org.apache.aries.blueprint - 0.1.0.incubating | Unable to start blueprint

      container for bundle org.apache.karaf.management

      org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean connectorFactory

              at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:582)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:693)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:64)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:219)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:147)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:624)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:315)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:213)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)[:1.6.0_21]

              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)[:1.6.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

              at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

      Caused by: javax.management.InstanceAlreadyExistsException: connector:name=rmi

              at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:453)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1484)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:963)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:917)[:1.6.0_21]

              at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:312)[:1.6.0_21]

              at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:482)[:1.6.0_21]

              at org.apache.karaf.management.ConnectorServerFactory.init(ConnectorServerFactory.java:94)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_21]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_21]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_21]

              at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_21]

              at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:230)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:803)[118:org.apache.aries.blueprint:0.1.0.incubating]

              at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:580)[118:org.apache.aries.blueprint:0.1.0.incubating]

              ... 15 more