Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.8.0
-
None
-
Unknown
Description
When routes are getting started by the camel-blueprint component, the thread context classloader at that moment is the container's boot classloader. This is causing problems for e.g. ActiveMQ object messages that need to get deserialized, because the boot classloader is not aware of classes that might be available inside the container. The class used for reading the ActiveMQ object messages is http://svn.apache.org/repos/asf/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/ClassLoadingAwareObjectInputStream.java.
We can fix this by setting a more appropriate classloader as the thread context classloader while starting the CamelContext from a Blueprint definition. I see we also have a similar class in camel-jdbc and there are no doubt other libraries that depend on this classloader being set as well, so this change should help with all of those cases.