Hi Willem. yes, I have tried the servicemix-camel example, and it is working correctly.
I have two bundles: 1. Business model + Xml marshalling (xstream) + DB persistence (hibernate) 2. Routes, with beans using classes from bundle 1. I have been trying different things, and I think my problem is related with OSGi deployment, but no error or warning is returning while installing the bundles. If I join both bundles into one, everything runs fine (or at least everything is installed without errors), the routes are found correctly. If I split them, my camelcontext does not find the routes. In this deployment (two separate bundles), If I add a new XML route (from camel example) to bundle 2 it gives the "No component found with scheme: timer" Error. Any hints, anyone? Thank you very much. Javier Arias. 2011/7/25 Willem Jiang <willem.ji...@gmail.com> > > The timer component is part of camel-core, you don't need to install any > other camel component by default. > > BTW, can you try out the servicemix-camel example which ships with > ServiceMix 4.3.0 ? > > > > On 7/25/11 7:00 PM, Javier Arias Losada wrote: > >> Hello everybody, >> I am in the process of migrating our old camel2.2+servicemix3.3.2 to >> camel2.6+servicemix4.3.0. >> >> I am experiencing problems with my CamelContext, my routes are not being >> loaded; camel-context.xml is found and beans instantiated, but routes (I >> am >> using Java DSL) are not found::: >> >> "Total 0 routes, of which 0 is started." >> >> Just for checking my camelcontext loading, I added a new XML route (copied >> from servicemix-camel examples) to my context and I get the following >> error: >> >> >> Failed to resolve endpoint: timer://myTimer?fixedRate=**true&period=3000 >> due >> to: No component found with scheme: timer >> >> At the end of the mail i've pasted the stacktrace. >> >> Something is wrong with my camelcontext but I do not know what, any >> comments >> or help will be appreciated. >> Best regards. >> Javier Arias >> >> PD: The stack trace is:::: >> >> 12:27:05,500 | INFO | ExtenderThread-8 | OsgiSpringCamelContext >> | >> 70 - org.apache.camel.camel-core - 2.6.0 | Apache Camel 2.6.0 >> (CamelContext: >> mykootsCamelContext) is shutdown in 0.001 seconds >> 12:27:05,500 | ERROR | ExtenderThread-8 | ContextLoaderListener >> | >> 74 - org.springframework.osgi.**extender - 1.2.0 | Application context >> refresh >> failed (**OsgiBundleXmlApplicationContex**t(bundle=com.mykoots.** >> integration, >> config=osgibundle:/META-INF/**spring/*.xml)) >> org.apache.camel.**RuntimeCamelException: >> org.apache.camel.**FailedToCreateRouteException: Failed to create route >> route1: Route[[From[timer://myTimer?**fixedRate=true&period=3000]] -> >> ... >> because of Failed to resolve endpoint: >> timer://myTimer?fixedRate=**true&period=3000 due to: No component found >> with >> scheme: timer >> at >> org.apache.camel.util.**ObjectHelper.**wrapRuntimeCamelException(** >> ObjectHelper.java:1139)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.**onApplicationEvent(** >> SpringCamelContext.java:103)[**77:org.apache.camel.camel-**spring:2.6.0] >> at >> org.apache.camel.spring.**CamelContextFactoryBean.**onApplicationEvent(** >> CamelContextFactoryBean.java:**237)[77:org.apache.camel.** >> camel-spring:2.6.0] >> at >> org.springframework.context.**event.**SimpleApplicationEventMulticas** >> ter.multicastEvent(**SimpleApplicationEventMulticas**ter.java:97)[63:org. >> **springframework.context:3.0.5.**RELEASE] >> at >> org.springframework.context.**support.**AbstractApplicationContext.** >> publishEvent(**AbstractApplicationContext.**java:303)[63:org.** >> springframework.context:3.0.5.**RELEASE] >> at >> org.springframework.context.**support.**AbstractApplicationContext.** >> finishRefresh(**AbstractApplicationContext.**java:911)[63:org.** >> springframework.context:3.0.5.**RELEASE] >> at >> org.springframework.osgi.**context.support.** >> AbstractOsgiBundleApplicationC**ontext.finishRefresh(** >> AbstractOsgiBundleApplicationC**ontext.java:235)[73:org.** >> springframework.osgi.core:1.2.**0] >> at >> org.springframework.osgi.**context.support.** >> AbstractDelegatedExecutionAppl**icationContext$4.run(** >> AbstractDelegatedExecutionAppl**icationContext.java:358)[73:** >> org.springframework.osgi.core:**1.2.0] >> at >> org.springframework.osgi.util.**internal.PrivilegedUtils.** >> executeWithCustomTCCL(**PrivilegedUtils.java:85)[73:** >> org.springframework.osgi.core:**1.2.0] >> at >> org.springframework.osgi.**context.support.** >> AbstractDelegatedExecutionAppl**icationContext.**completeRefresh(** >> AbstractDelegatedExecutionAppl**icationContext.java:320)[73:** >> org.springframework.osgi.core:**1.2.0] >> at >> org.springframework.osgi.**extender.internal.**dependencies.startup.** >> DependencyWaiterApplicationCon**textExecutor$**CompleteRefreshTask.run(** >> DependencyWaiterApplicationCon**textExecutor.java:136)[74:org.** >> springframework.osgi.extender:**1.2.0] >> at java.lang.Thread.run(Thread.**java:679)[:1.6.0_22] >> Caused by: org.apache.camel.**FailedToCreateRouteException: Failed to >> create >> route route1: Route[[From[timer://myTimer?**fixedRate=true&period=3000]] >> -> >> ... because of Failed to resolve endpoint: >> timer://myTimer?fixedRate=**true&period=3000 due to: No component found >> with >> scheme: timer >> at >> org.apache.camel.model.**RouteDefinition.addRoutes(** >> RouteDefinition.java:165)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.**startRoute(** >> DefaultCamelContext.java:701)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.**startRouteDefinitions(** >> DefaultCamelContext.java:1623)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.**doStartCamel(** >> DefaultCamelContext.java:1412)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.doStart(** >> DefaultCamelContext.java:1321)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.doStart(** >> SpringCamelContext.java:164)[**77:org.apache.camel.camel-**spring:2.6.0] >> at >> org.apache.camel.impl.**ServiceSupport.start(** >> ServiceSupport.java:65)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**ServiceSupport.start(** >> ServiceSupport.java:52)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.start(** >> DefaultCamelContext.java:1299)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.maybeStart(** >> SpringCamelContext.java:203)[**77:org.apache.camel.camel-**spring:2.6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.**onApplicationEvent(** >> SpringCamelContext.java:101)[**77:org.apache.camel.camel-**spring:2.6.0] >> ... 10 more >> Caused by: org.apache.camel.**ResolveEndpointFailedException**: Failed to >> resolve endpoint: timer://myTimer?fixedRate=**true&period=3000 due to: No >> component found with scheme: timer >> at >> org.apache.camel.impl.**DefaultCamelContext.**getEndpoint(** >> DefaultCamelContext.java:456)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.util.**CamelContextHelper.**getMandatoryEndpoint(** >> CamelContextHelper.java:47)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.model.**RouteDefinition.**resolveEndpoint(** >> RouteDefinition.java:175)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultRouteContext.**resolveEndpoint(** >> DefaultRouteContext.java:110)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultRouteContext.**resolveEndpoint(** >> DefaultRouteContext.java:116)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.model.**FromDefinition.**resolveEndpoint(** >> FromDefinition.java:72)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultRouteContext.**getEndpoint(** >> DefaultRouteContext.java:88)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.model.**RouteDefinition.addRoutes(** >> RouteDefinition.java:737)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.model.**RouteDefinition.addRoutes(** >> RouteDefinition.java:160)[70:**org.apache.camel.camel-core:2.**6.0] >> ... 20 more >> 12:27:05,500 | INFO | ExtenderThread-8 | OsgiSpringCamelContext >> | >> 70 - org.apache.camel.camel-core - 2.6.0 | Apache Camel 2.6.0 >> (CamelContext: >> mytestCamelContext) is shutdown in 0.001 seconds >> 12:27:05,500 | ERROR | ExtenderThread-8 | ContextLoaderListener >> | >> 74 - org.springframework.osgi.**extender - 1.2.0 | Application context >> refresh >> failed (**OsgiBundleXmlApplicationContex**t(bundle=com.mytest.** >> integration, >> config=osgibundle:/META-INF/**spring/*.xml)) >> org.apache.camel.**RuntimeCamelException: >> org.apache.camel.**FailedToCreateRouteException: Failed to create route >> route1: Route[[From[timer://myTimer?**fixedRate=true&period=3000]] -> >> ... >> because of Failed to resolve endpoint: >> timer://myTimer?fixedRate=**true&period=3000 due to: No component found >> with >> scheme: timer >> at >> org.apache.camel.util.**ObjectHelper.**wrapRuntimeCamelException(** >> ObjectHelper.java:1139)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.**onApplicationEvent(** >> SpringCamelContext.java:103)[**77:org.apache.camel.camel-**spring:2.6.0] >> at >> org.apache.camel.spring.**CamelContextFactoryBean.**onApplicationEvent(** >> CamelContextFactoryBean.java:**237)[77:org.apache.camel.** >> camel-spring:2.6.0] >> at >> org.springframework.context.**event.**SimpleApplicationEventMulticas** >> ter.multicastEvent(**SimpleApplicationEventMulticas**ter.java:97)[63:org. >> **springframework.context:3.0.5.**RELEASE] >> at >> org.springframework.context.**support.**AbstractApplicationContext.** >> publishEvent(**AbstractApplicationContext.**java:303)[63:org.** >> springframework.context:3.0.5.**RELEASE] >> at >> org.springframework.context.**support.**AbstractApplicationContext.** >> finishRefresh(**AbstractApplicationContext.**java:911)[63:org.** >> springframework.context:3.0.5.**RELEASE] >> at >> org.springframework.osgi.**context.support.** >> AbstractOsgiBundleApplicationC**ontext.finishRefresh(** >> AbstractOsgiBundleApplicationC**ontext.java:235)[73:org.** >> springframework.osgi.core:1.2.**0] >> at >> org.springframework.osgi.**context.support.** >> AbstractDelegatedExecutionAppl**icationContext$4.run(** >> AbstractDelegatedExecutionAppl**icationContext.java:358)[73:** >> org.springframework.osgi.core:**1.2.0] >> at >> org.springframework.osgi.util.**internal.PrivilegedUtils.** >> executeWithCustomTCCL(**PrivilegedUtils.java:85)[73:** >> org.springframework.osgi.core:**1.2.0] >> at >> org.springframework.osgi.**context.support.** >> AbstractDelegatedExecutionAppl**icationContext.**completeRefresh(** >> AbstractDelegatedExecutionAppl**icationContext.java:320)[73:** >> org.springframework.osgi.core:**1.2.0] >> at >> org.springframework.osgi.**extender.internal.**dependencies.startup.** >> DependencyWaiterApplicationCon**textExecutor$**CompleteRefreshTask.run(** >> DependencyWaiterApplicationCon**textExecutor.java:136)[74:org.** >> springframework.osgi.extender:**1.2.0] >> at java.lang.Thread.run(Thread.**java:679)[:1.6.0_22] >> Caused by: org.apache.camel.**FailedToCreateRouteException: Failed to >> create >> route route1: Route[[From[timer://myTimer?**fixedRate=true&period=3000]] >> -> >> ... because of Failed to resolve endpoint: >> timer://myTimer?fixedRate=**true&period=3000 due to: No component found >> with >> scheme: timer >> at >> org.apache.camel.model.**RouteDefinition.addRoutes(** >> RouteDefinition.java:165)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.**startRoute(** >> DefaultCamelContext.java:701)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.**startRouteDefinitions(** >> DefaultCamelContext.java:1623)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.**doStartCamel(** >> DefaultCamelContext.java:1412)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.doStart(** >> DefaultCamelContext.java:1321)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.doStart(** >> SpringCamelContext.java:164)[**77:org.apache.camel.camel-**spring:2.6.0] >> at >> org.apache.camel.impl.**ServiceSupport.start(** >> ServiceSupport.java:65)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**ServiceSupport.start(** >> ServiceSupport.java:52)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultCamelContext.start(** >> DefaultCamelContext.java:1299)**[70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.maybeStart(** >> SpringCamelContext.java:203)[**77:org.apache.camel.camel-**spring:2.6.0] >> at >> org.apache.camel.spring.**SpringCamelContext.**onApplicationEvent(** >> SpringCamelContext.java:101)[**77:org.apache.camel.camel-**spring:2.6.0] >> ... 10 more >> Caused by: org.apache.camel.**ResolveEndpointFailedException**: Failed to >> resolve endpoint: timer://myTimer?fixedRate=**true&period=3000 due to: No >> component found with scheme: timer >> at >> org.apache.camel.impl.**DefaultCamelContext.**getEndpoint(** >> DefaultCamelContext.java:456)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.util.**CamelContextHelper.**getMandatoryEndpoint(** >> CamelContextHelper.java:47)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.model.**RouteDefinition.**resolveEndpoint(** >> RouteDefinition.java:175)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultRouteContext.**resolveEndpoint(** >> DefaultRouteContext.java:110)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.impl.**DefaultRouteContext.**resolveEndpoint(** >> DefaultRouteContext.java:116)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.model.**FromDefinition.**resolveEndpoint(** >> FromDefinition.java:72)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.impl.**DefaultRouteContext.**getEndpoint(** >> DefaultRouteContext.java:88)[**70:org.apache.camel.camel-**core:2.6.0] >> at >> org.apache.camel.model.**RouteDefinition.addRoutes(** >> RouteDefinition.java:737)[70:**org.apache.camel.camel-core:2.**6.0] >> at >> org.apache.camel.model.**RouteDefinition.addRoutes(** >> RouteDefinition.java:160)[70:**org.apache.camel.camel-core:2.**6.0] >> ... 20 more >> >> > > -- > Willem > ------------------------------**---- > FuseSource > Web: http://www.fusesource.com > Blog: > http://willemjiang.blogspot.**com<http://willemjiang.blogspot.com>(English) > http://jnn.javaeye.com (Chinese) > Twitter: willemjiang > Weibo: willemjiang >