I forgot to mention that I run Camel from a OSGi container (as part of JBoss Fuse). Seems there is a bug related to this for which a fix has been implemented already: https://issues.apache.org/jira/browse/CAMEL-4915 However, since adding dynamic imports to camel-core solves the issue it seems that the bug is still there(?) Exact version of camel-core: 2.12.0.redhat-610379
Moreover, I guess the serialization is done on the message body only and not the exchange since I lose all headers? Can I serialize the full message to include all headers? I do this in the first route: <camel:marshal> <camel:serialization /> </camel:marshal> <camel:marshal> <camel:base64/> </camel:marshal> And the other way around in the second route. Thanks Gustav Sinder -----Original Message----- From: Gustav Sinder [mailto:gustav.sin...@ferrologic.se] Sent: den 17 juni 2015 09:46 To: users@camel.apache.org Subject: Unmarshalling serialization fails with ClassNotFoundException Hi, I'm working on converting a flow (consists of 2 camel contexts) to use Amazon SQS instead of ActiveMQ (which worked just fine). Setup: File -> Camel context 1 -> AWS SQS -> Camel context 2 -> Databsae Connectivity isn't an issue but I need to marshal/unmarshal the messages using base64 since SQS only supports text messages. Additionally I need to marshal the Java Objects using serialization prior to base64 since the base64 marshaller only takes a byte stream. Camel context 1: (Marshal: serialization, base64), writes a CamelExchange Camel context 2: (Unmarshal: base64, serialization), reads a CamelExchange The issue occurs in the second context when I try to unmarshal the bytestream to the Java object and I get a ClassNotFoundException for "MyObject". "MyMessage" -> "MyObject" A common bundle exports the objects in question and both contexts imports them. Camel version 2.12 Thanks /Gustav