f2par0 opened a new issue, #553:
URL: https://github.com/apache/camel-karaf/issues/553

   
   When deploying a camel route from a blueprint with a RouteBuilder, like : 
   ```
   <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0";>
           <bean id="route" 
class="org.apache.karaf.camel.examples.test.TestBuilder"  />
           <camelContext xmlns="http://camel.apache.org/schema/blueprint"; 
id="ctx3">
               <routeBuilder ref="route"/>
           </camelContext>
       </blueprint>
   ```
   this exception occurs : 
   
   ```
   
   org.apache.camel.NoSuchBeanException: Found bean: route in 
BlueprintContainer: 
org.apache.aries.blueprint.container.BlueprintContainerImpl@6b10e004 of type: 
local_project.demorestroute_0_1.DemoRESTRoute expected type was: interface 
org.apache.camel.spi.VariableRepository
           at 
org.apache.camel.blueprint.BlueprintContainerBeanRepository.lookupByNameAndType(BlueprintContainerBeanRepository.java:73)
 ~[?:?]
           at 
org.apache.camel.support.DefaultRegistry.lookupByNameAndType(DefaultRegistry.java:310)
 ~[?:?]
           at 
org.apache.camel.support.CamelContextHelper.lookup(CamelContextHelper.java:203) 
~[?:?]
           at 
org.apache.camel.impl.engine.DefaultVariableRepositoryFactory.getVariableRepository(DefaultVariableRepositoryFactory.java:68)
 ~[?:?]
           at 
org.apache.camel.impl.engine.DefaultVariableRepositoryFactory.doStart(DefaultVariableRepositoryFactory.java:111)
 ~[?:?]
           at 
org.apache.camel.support.service.BaseService.start(BaseService.java:123) 
~[bundleFile:?]
           at 
org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:126)
 ~[bundleFile:?]
           at 
org.apache.camel.impl.engine.DeferServiceStartupListener.doStart(DeferServiceStartupListener.java:63)
 ~[bundleFile:?]
           at 
org.apache.camel.impl.engine.DeferServiceStartupListener.onCamelContextStarting(DeferServiceStartupListener.java:49)
 ~[bundleFile:?]
           at 
org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2817)
 ~[bundleFile:?]
           at 
org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2528)
 ~[bundleFile:?]
           at 
org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2483)
 ~[bundleFile:?]
           at 
org.apache.camel.support.service.BaseService.start(BaseService.java:123) 
~[bundleFile:?]
           at 
org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2087)
 ~[bundleFile:?]
           at 
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211) 
~[bundleFile:?]
           at 
org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:234)
 ~[bundleFile:?]
           at 
org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:276)
 ~[bundleFile:?]
           at 
org.apache.camel.blueprint.BlueprintCamelContext.blueprintEvent(BlueprintCamelContext.java:180)
 [bundleFile:?]
           at 
org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:197)
 [bundleFile:1.10.3]
           at 
org.apache.aries.blueprint.container.BlueprintEventDispatcher$3.call(BlueprintEventDispatcher.java:195)
 [bundleFile:1.10.3]
           at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
           at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
           at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
           at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 [?:?]
           at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) 
[?:?]
           at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) 
[?:?]
           at java.lang.Thread.run(Thread.java:840) [?:?]
   Caused by: java.lang.ClassCastException: Cannot cast 
local_project.demorestroute_0_1.DemoRESTRoute to 
org.apache.camel.spi.VariableRepository
           at java.lang.Class.cast(Class.java:3890) ~[?:?]
           at 
org.apache.camel.blueprint.BlueprintContainerBeanRepository.lookupByNameAndType(BlueprintContainerBeanRepository.java:69)
 ~[?:?]
           ... 28 more
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to