Gert Vanthienen wrote
> 
> I just raised https://issues.apache.org/jira/browse/CAMEL-4147 to keep
> track of this request.
> 

Even in a Spring application in ServiceMix (4.3), this error can also occur.
This seems to be a race condition, when camel-core is not yet fully started
and an application route is started "too soon" and fails to find the Camel
converters.
When the problem happens, it is enough to restart the application bundle to
make it work.

11:07:48,603 | ERROR | ExtenderThread-7 | ContextLoaderListener            |
94 - org.springframework.osgi.extender - 1.2.0 | Application context refresh
failed (OsgiBundleXmlApplicationContext(bundle=my-application,
config=osgibundle:/META-INF/spring/*.xml))
org.apache.camel.RuntimeCamelException:
org.apache.camel.TypeConverterLoaderException: Failed to load type
converters because of: Cannot find any type converter classes from the
following packages: [org.apache.camel.component.file,
org.apache.camel.component.bean, org.apache.camel.converter]
        at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:971)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.getTypeConverterRegistry(DefaultCamelContext.java:986)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1911)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1403)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1321)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:164)[97:org.apache.camel.camel-spring:2.6.0]
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1299)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)[97:org.apache.camel.camel-spring:2.6.0]
        at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)[97:org.apache.camel.camel-spring:2.6.0]
        at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:237)[97:org.apache.camel.camel-spring:2.6.0]
        at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)[83:org.springframework.context:3.0.5.RELEASE]
        at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)[83:org.springframework.context:3.0.5.RELEASE]
        at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)[83:org.springframework.context:3.0.5.RELEASE]
        at
org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)[93:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)[93:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[93:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)[93:org.springframework.osgi.core:1.2.0]
        at
org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)[94:org.springframework.osgi.extender:1.2.0]
        at java.lang.Thread.run(Thread.java:662)[:1.6.0_25]
Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load
type converters because of: Cannot find any type converter classes from the
following packages: [org.apache.camel.component.file,
org.apache.camel.component.bean, org.apache.camel.converter]
        at
org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:77)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:395)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:41)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:65)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1593)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:884)[90:org.apache.camel.camel-core:2.6.0]
        at
org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:969)[90:org.apache.camel.camel-core:2.6.0]
        ... 20 more


--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-under-OSGi-without-Spring-et-al-tp4507473p5038265.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to