You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2011/07/15 08:03:00 UTC

[jira] [Updated] (CAMEL-4231) shouldn't call BaseTypeConverterRegistry.loadTypeConverters() in OSGi container

     [ https://issues.apache.org/jira/browse/CAMEL-4231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang updated CAMEL-4231:
--------------------------------

    Fix Version/s: 2.8.0

> shouldn't call BaseTypeConverterRegistry.loadTypeConverters() in OSGi container
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-4231
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4231
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>            Reporter: Freeman Fang
>             Fix For: 2.8.0
>
>
> the Activator in camel-core take care of loading the converters from bundles, we should avoid  calling BaseTypeConverterRegistry.loadTypeConverters() in OSGi container, otherwise due to no classloader was specified, see this code in OsgiTypeConverter
>             @Override
>             public Set<ClassLoader> getClassLoaders() {
>                 // we don't need any classloaders as we use osgi service tracker instead
>                 return Collections.emptySet();
>             }
> we'll get exception like
> 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.servicemix.camel.converter]
> 	at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:90)
> 	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:406)
> 	at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:42)
> 	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
> 	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
> 	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:56)
> 	at org.apache.camel.core.osgi.OsgiTypeConverter.createRegistry(OsgiTypeConverter.java:163)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira