We've come across a problem in Camel 2.7.1 where Camel fails to start up
due to a TypeConverterLoaderException. This is a regression, as we've
had no such problem in Camel 2.5.0. Is this a known issue? Googling
around, I've found [1], which states:
My second problem is that it's currently not possible to start camel
without the AnnotationTypeConverterLoader added. In case of a webstart
based client application this causes startup errors that prevents using
camel.
I added an attribute to suppress the usage of
AnnotationTypeConverterLoader in my local sources and I've prepared a
patch for this problem and the problem described above with test case.
Should I create a JIRA issue?
I can't say that I understand his description of the problem or his
fix. Has a jira issue been created?
My reproduction is simple:
public static void main(String... args) {
try {
CamelContext context = new DefaultCamelContext();
context.getTypeConverterRegistry();
LOGGER.info("Success");
}
catch(Exception e) {
LOGGER.error("Failed", e);
}
}
This runs fine in my ide and fails with [2] when deployed via webstart.
Thanks,
Jim
[1]
http://mail-archives.apache.org/mod_mbox/camel-users/201104.mbox/%3c1302240811211-4290078.p...@n5.nabble.com%3E
[2] exception:
2011-05-26 16:52:57,550 [javawsApplicationMain] ERROR
test.TestCamelContext - Failed
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)
at
org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:986)
at
org.apache.camel.impl.DefaultCamelContext.getTypeConverterRegistry(DefaultCamelContext.java:1001)
at test.TestCamelContext.test(TestCamelContext.java:54)
at test.TestCamelContext.main(TestCamelContext.java:48)
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 com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
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:79)
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:395)
at
org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:41)
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:60)
at
org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1613)
at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:899)
at
org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:984)
... 12 more