Cockpit: Deserialization Error: Cannot deserialize object in variable with application specific types

The process itself works fine, all classes part of the “app.war” which is deployed to the wildfly container.

The part that doesn’t work is inspecting the variable in the Cockpit as it does not load the application classes (which seems to work in Tasklist).

Error on ‘Inspect “myVar” variable’:

Deserialization Error: Cannot deserialize object in variable ‘myVar’: ENGINE-09017 Cannot load class ‘de.my.package.MyObject’: de.my.package.MyObject from [Module “deployment.camunda-webapp-jboss-7.7.0.war:main” from Service Module Loader]

Is there a way to specify application-specific classes which should be loaded in the Cockpit?
If not, what would be the best way to allow this (maybe just adding the used classes to the camunda-webapp-jboss-7.7.0.war directly)?

No, this is not possible.

Yes, you can do that. This could become a maintenance problem though, for example think about the cases when your classes evolve.

I recommend to use a text-based serialization format for object type variables such as JSON or XML, so you can inspect the serialized value in Cockpit.

Cheers,
Thorben

I recommend to use a text-based serialization format for object type variables such as JSON or XML, so you can inspect the serialized value in Cockpit.

Good recommendation, thank you!

Hello guys,

I’ve been trying to store my objects as JSON, but the data was stored as application/x-java-serialized-object

What I used on my application.yml:
camunda.bpm.default-serialization-format=application/json

Code:
runtimeService.setVariable(executionId, variableName, object);

Could you help me?
Thanks.

Hi @regissantana,

please have a look at this post: Unsupported value type '*Json'*

Hope this helps, Ingo