-
Enhancement
-
Resolution: Done
-
Major
-
1.6.1.0-fuse
-
None
-
None
The use case is to have Camel route messages between JMS queues. The messages themselves are JMS ObjectMessage which contain serialized Java objects. If Camel receives one of these it will try and instantiate the object in which case an error is thrown:
org.apache.camel.component.jms.RuntimeJmsException: Failed to extract body due to:
javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason:
java.lang.ClassNotFoundException: org.someclass.that.im.Sending
Looking at JmsConfiguration and the docs it appears you can configure Camel to use a custom Spring MessageConverter so I tried this (the attached test case) and while my MessageConverter is instantiated it's never actually used, so the outcome of my test route is the actual type and not a JMSMessage or ObjectMessage like I'd want. Seems like JmsBinding should be using the MessageConverter instead of what it's doing in extractBodyFromJms() where it directly tests for each type of message, I believe this is where the above exception is actually coming from.