ClassNotFoundException when using setVariable(...) with a custom POGO

cancel
Showing results for 
Search instead for 
Did you mean: 
louisp
Member II

ClassNotFoundException when using setVariable(...) with a custom POGO

I am calling setVariable(...) using a POGO, it does not raised any err, but later, when my BPMN reaches a Service Task I get the following err :

java.lang.ClassNotFoundException: <MyClass> at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedWebappClassLoader.loadClass(TomcatEmbeddedWebappClassLoader.java:74) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName0(Class.java:348) at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:291) at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:68) at org.activiti.engine.impl.variable.SerializableType$1.resolveClass(SerializableType.java:124)

Is there a way to make Activiti aware of this POGO ? I am already loading a custom JAR into my GroovyScriptingEngine, but it does not seem enough.

Same topic on stackoverflow : https://stackoverflow.com/questions/56395310/activiti-setvariable-with-custom-pogos

1 Reply
abbask01
Senior Member

Re: ClassNotFoundException when using setVariable(...) with a custom POGO

Please share your POJO.

Have you implemented the Serializable interface? it is mandatory to implement, for acitiviti to persist data in DB

Regards,
Abbas