AnsweredAssumed Answered

Getting NotSerializableException from DefaultMessageHistory

Question asked by bogdan.aioanei on Aug 11, 2014
Latest reply on Aug 11, 2014 by bogdan.aioanei
Hello everyone,

I'm new to Apache Camel and have been trying to integrate it with Activiti BPMN engine.

I have a very simple BPMN process that has a serviceTask of type 'camel' and two routes defined in a SpringRouteBuilder like so:

public class CamelHelloRoute extends SpringRouteBuilder {

        public void configure() throws Exception {
                from("activiti:camelTestProcess:camelTaskId").log(LoggingLevel.INFO, "Received message in CAMEL " + property("var1")).setProperty("greeting").constant("ceva").setBody().properties();


I wrote a unit test to see if my property ("var1") has the value I set in the test and also to check if another property ("greeting") is being set. When I run the test I get a NotSerializableException, stack trace in the attached file, and I don't know why this is happening.

If I don't try to set the "greeting" property then everything is ok. I tried to disable message history on the context but I still got the same problem. And the logging isn't even working in either scenario.

Am I missing something? I'm using Spring with Camel configured via Java by extending the CamelConfiguration class. Is there any extra configuration that needs to be done?