Jackson-JSON does not de-serialize ZonedDateTime when using an event gateway or intermediate message event

There is something weird going on with serializing an object and ZonedDateTime. I used the example project “jackson-annotations”. I added a field with type ZonedDateTime. Changed the user-task to a service-task. This uses a delegate class that outputs the ExampleDto object to the log. This works good.
BUT then I added a event gateway and a timer that waits 5 seconds between the start and the service-task. Then suddenly jackson has problem to de-serialize the ExampleDto object and I get the error : “Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of java.time.ZonedDateTime (no Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: org.camunda.examples.ExampleDto[“zonedDateTime”])”

Files attached:

  • Waitingstate.bpmn
  • error.log
  • some-project-files:
    • class ExampleDto (Added ZonedDateTime attribute)
    • class ShowObjectInLog (The JavaDelegate class that outputs something to the log)
    • class JacksonAnnotationApplication
    • jboss-deployment-structure.xml (Updated for 7.11.0)
    • pom.xml (Updated for 7.11.0)

serialization-stopped-workingwaitingState.bpmn (5.9 KB)error.log (318.1 KB)some-project-files.txt (8.1 KB)

Is there a mistake I am making here?

@stevena are Java8 Jackson datatypes installed?

It looks like SPIN never implemented it fully:

1 Like