SpinValues.jsonValue error

Hello

I try to create your example in my code what was describe here: https://docs.camunda.org/manual/latest/user-guide/data-formats/json/

I got Exception in thread "main" org.camunda.bpm.engine.ProcessEngineException: Cannot find serializer for value 'Value 'null' of type 'json''. error do you have any idea what can be wrong?

Here is my code:

Map<String, Object> variables = new HashMap<String, Object>();
String json = "{\"name\" : \"jonny\","
        + "\"address\" : {"
          + "\"street\" : \"12 High Street\","
          + "\"post code\" : 1234"
          + "}"
        + "}";
JsonValue jsonValue = SpinValues.jsonValue(json).create();
variables.put("json", jsonValue);

String id = pe.getRuntimeService().startProcessInstanceByKey("test", variables).getProcessInstanceId();

I checked the object and the value is null as the error describe only the jsonValue.serializedValue contains what I set.

Thanks: Gábor

Hello Gábor,

Did you check this post: How to store JSON in process? Example from manual doesn't work?

Best regards,
Yana

hello

yes, it is working if I create a jar and put into the lib at a shared engine but under eclipse it is not working. Anyhow I shoud enable the spin maybe.

Regards:Gabor

Hello Gábor,

Yes, you need spin plugin dependency and camunda-spin-dataformat-json-jackson.
Please add this dependencies to your eclipse project and share the results.

Best regards,
Yana

Hi Gábor,

Make sure you enable the Spin process engine plugin as documented here: https://docs.camunda.org/manual/7.8/user-guide/data-formats/configuring-spin-integration/#configuring-the-spin-process-engine-plugin

Cheers,
Thorben