5 Replies Latest reply on Jun 24, 2014 11:26 AM by davsclaus

    Blueprint test with Cache

    vincent.crepin

      Hello.

       

      I'm trying to test a blueprint (XML DSL) route that uses the cache component (EHCACHE) in the following way:

       

      <endpoint
      uri="cache://outilAssignationListeSinistresCacheV1?maxElementsInMemory=10&amp;memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.LFU&amp;timeToLiveSeconds=86400&amp;timeToIdleSeconds=86400&amp;overflowToDisk=true&amp;eternal=false&amp;diskPersistent=true&amp;diskExpiryThreadIntervalSeconds=3600"
      id="outilAssignationListeSinistresCacheV1" />

       

      4 times out of 5 I get the following exception:

       

      org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[cache://outilAssignationListeSinistresCacheV1?diskExpiryThreadIntervalSeconds=3600&diskPersistent=true&eternal=false&maxElementsInMemory=10&memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.LFU&overflowToDisk=true&timeToIdleSeconds=86400&timeToLiveSeconds=86400]. Reason: java.lang.IllegalArgumentException: cacheManagerFactory must be specified

        at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:409)

        at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123)

        at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:191)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.processor.WrapProcessor.doStart(WrapProcessor.java:52)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1154)

        at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:41)

        at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:28)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:994)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.processor.WrapProcessor.doStart(WrapProcessor.java:52)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1154)

        at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:41)

        at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:28)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)

        at org.apache.camel.processor.FilterProcessor.doStart(FilterProcessor.java:80)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.ChoiceProcessor.doStart(ChoiceProcessor.java:171)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.processor.WrapProcessor.doStart(WrapProcessor.java:52)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1154)

        at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:41)

        at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:28)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)

        at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)

        at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)

        at org.apache.camel.impl.RouteService.startChildService(RouteService.java:329)

        at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)

        at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2150)

        at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2080)

        at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1868)

        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1740)

        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1579)

        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)

        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1547)

        at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:177)

        at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:137)

        at com.lacapitale.camel.blueprint.jetty.OutilAssignationListeSinistresRouteV1Test.setUp(OutilAssignationListeSinistresRouteV1Test.java:60)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)

        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)

        at org.junit.rules.RunRules.evaluate(RunRules.java:20)

        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: java.lang.IllegalArgumentException: cacheManagerFactory must be specified

        at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:297)

        at org.apache.camel.component.cache.CacheEndpoint.createProducer(CacheEndpoint.java:65)

        at org.apache.camel.impl.InterceptSendToEndpoint.createProducer(InterceptSendToEndpoint.java:100)

        at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:405)

        ... 124 more

       

       

      java.lang.NullPointerException

        at com.lacapitale.camel.blueprint.jetty.OutilAssignationListeSinistresRouteV1Test.tearDown(OutilAssignationListeSinistresRouteV1Test.java:78)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)

        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)

        at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)

        at org.junit.rules.RunRules.evaluate(RunRules.java:20)

        at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)

        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)

        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)

        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)

        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)

        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)

        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)

        at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)

        at org.junit.runners.ParentRunner.run(ParentRunner.java:309)

        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

       

      Is there something wrong in the way I use it ?

        • 1. Re: Blueprint test with Cache
          vincent.crepin

          There was no answer to my question (as all the questions I ask on this forum).

           

          This error was happening when running tests which is not that critical.

           

          But this problem started to occur on the real server...

           

          I have 2 bundles that use the cache and sometimes when I restart the container in which it is deployed, the same error happens and it prevents the route to be deployed. This is a big problem as the deployment and restart of the server is scripted and it cannot fail randomly

           

          I restart the container 3-4 times and the problem disappears.

           

          Anyone experiencing this ?

           

          Here is the stacktrace on the server:

          2014-06-20 10:27:04,246 | ERROR | FelixStartLevel  | BlueprintCamelContext            | .blueprint.BlueprintCamelContext  149 | 116 - org.apache.camel.camel-blueprint - 2.12.0.redhat-610379 | Error occurred during starting Camel: CamelContext(myContext) due Failed to create Producer for endpoint: Endpoint[cache://myCacheV1?diskExpiryThreadIntervalSeconds=3600&diskPersistent=false&eternal=false&maxElementsInMemory=1&memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.LFU&overflowToDisk=false&timeToIdleSeconds=72000&timeToLiveSeconds=72000]. Reason: java.lang.IllegalArgumentException: cacheManagerFactory must be specified

          org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[cache://myCacheV1?diskExpiryThreadIntervalSeconds=3600&diskPersistent=false&eternal=false&maxElementsInMemory=1&memoryStoreEvictionPolicy=MemoryStoreEvictionPolicy.LFU&overflowToDisk=false&timeToIdleSeconds=72000&timeToLiveSeconds=72000]. Reason: java.lang.IllegalArgumentException: cacheManagerFactory must be specified

            at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:409)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:191)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1154)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:41)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:28)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:994)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1154)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:41)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:28)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:994)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.RouteService.startChildService(RouteService.java:329)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.RouteService.warmUp(RouteService.java:158)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2150)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2080)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1868)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1740)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1579)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1547)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:177)[116:org.apache.camel.camel-blueprint:2.12.0.redhat-610379]

            at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:209)[116:org.apache.camel.camel-blueprint:2.12.0.redhat-610379]

            at org.apache.camel.blueprint.BlueprintCamelContext.serviceChanged(BlueprintCamelContext.java:147)[116:org.apache.camel.camel-blueprint:2.12.0.redhat-610379]

            at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:934)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:795)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4666)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix.registerService(Felix.java:3674)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:347)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:448)[9:org.apache.aries.blueprint.core:1.0.1.redhat-610379]

            at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:383)[9:org.apache.aries.blueprint.core:1.0.1.redhat-610379]

            at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)[9:org.apache.aries.blueprint.core:1.0.1.redhat-610379]

            at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:270)[9:org.apache.aries.blueprint.core:1.0.1.redhat-610379]

            at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:233)[9:org.apache.aries.blueprint.core:1.0.1.redhat-610379]

            at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[11:org.apache.aries.util:1.0.1.redhat-610379]

            at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[11:org.apache.aries.util:1.0.1.redhat-610379]

            at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[11:org.apache.aries.util:1.0.1.redhat-610379]

            at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[11:org.apache.aries.util:1.0.1.redhat-610379]

            at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[11:org.apache.aries.util:1.0.1.redhat-610379]

            at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:696)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:484)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4650)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix$4.run(Felix.java:2123)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix.runInContext(Felix.java:2147)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix.startBundle(Felix.java:2121)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1317)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:304)[org.apache.felix.framework-4.0.3.redhat-610379.jar:]

            at java.lang.Thread.run(Thread.java:744)[:1.7.0_51]

          Caused by: java.lang.IllegalArgumentException: cacheManagerFactory must be specified

            at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:297)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            at org.apache.camel.component.cache.CacheEndpoint.createProducer(CacheEndpoint.java:65)[302:org.apache.camel.camel-cache:2.12.0.redhat-610379]

            at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:405)[117:org.apache.camel.camel-core:2.12.0.redhat-610379]

            ... 102 more

          • 2. Re: Blueprint test with Cache
            davsclaus

            Is your intention to reuse the same ehcache manager instance across several bundles? Or do you want a local instance per bundle?

            • 3. Re: Blueprint test with Cache
              vincent.crepin

              Hi Claus. Well whatever works best. I do not need to share cache data across bundles for now.

              • 4. Re: Blueprint test with Cache
                davsclaus

                I noticed a bug in camel-cache and logged a ticket: https://issues.apache.org/jira/browse/CAMEL-7531

                 

                The problem is when you have not configured your own ehcache.xml config file, then it was supposed to use a default config. But that logic was not done, so the cache manger factory is null.

                • 5. Re: Blueprint test with Cache
                  davsclaus

                  If you define your own ehcache.xml config file, and put that in the bundle, and then configure a cache component bean to use that file, then you should be okay

                   

                  <bean id="cache" class="org.apache....CacheComponent">

                    <property name="configurationFile" value="classpath:com/foo/myehcache.xml"/>

                  </bean>

                   

                  And then put your myehcache.xml file in the com.foo package of your bundle. And then make sure to export the com.foo package.