Spin fails to deserialize Spin objects

Hi together,

at our project we integrated the camunda spin plugin.

Now, when I use an expression as follows to parse a simple JSON object:

${S("{\"NR\":\"2600006733\"}")}

Then it throws the following exception indicating that the used ObjectMapper has no idea how to serialize objects of type JacksonJsonNode.

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of org.camunda.spin.impl.json.jackson.JacksonJsonNode (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)

This feels odd as JackJsonNode is a class from within Spin so I expected it to be compatible without any further modifications. Am I missing something?

As additional info, we use the following versions of spin-relevant-libraries:

  • camunda-engine-plugin-spin 7.17.0
  • camunda-spin-core 1.14.0
  • camunda-spin-dataformat-json-jackson 1.14.0
  • Jackson xxx 2.13.5 (differs from 2.13.1 as mentioned in spin pom’s)

I would highly appreciate any further ideas or investigations what the issue currently.

Kind regards
Alexander Skrock

hello my friend!

Does the object you are trying to serialize/deserialize have an empty constructor?

because Jackson uses reflection under the hood and for that it needs an empty constructor for initialization without parameters.

William Robert Alves

Hi @WilliamR.Alves ,

this answer does not really address my question. Of course, a class needs an empty constructor, a marked creator, custom serializer/deserializer or alike, but this class is contained within Camunda Spin itself, so it seems odd to me, that it is not deserialiable. I did not even choose to use this class, it is the one that Spin decides to use for the S and JSON functions.

So I rather expect either a problem inside Camunda Spin or a configuration / class path problem on my side.

Kind regards
Alexander Skrock

I understood…

Really quite strange…

So… I can’t imagine anything other than something related to the version of the dependency… :thinking: