First of all, we are currently running Camunda Platform 7.16 with Spring-boot.
We have been struggling a lot with Java 8 LocalDate and LocalDateTime.
Our latest issue is, that when we try to view any object from cockpit with localDateTime in it, we get a http 400.
It appears to originate from the rest API which repsonds to the variable query with:
Java 8 date/time type java.time.LocalDateTime not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: org.camunda.bpm.engine.rest.dto.history.HistoricVariableInstanceDto["value"]->actual.classpathHidden.SomeRandomDto["creationTime"])
We already have in our pom.xml (well, the super-pom to be precise):
<!-- Time OUT/IN JSON handling-->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
</dependency>
jackson-version is 2.13.0 if it matters.
This does the trick so that our Java code in the delegates can handle to LocalDates and LocaDateTimes, but rest api is still failing to present them.
Can someone help us understand what we are missing?
I’m having the exact same issue. I tried importing the “camunda-spin-dataformat-json-jackson” and “jackson-datatype-jsr310” maven dependency into my SpringBoot project, but I still haven’t managed to fix the issue.
is there a specific reason why you are serializing the process variable as java serialized object?
Using spin and configuring the default serialization format of the engine to be application/json will help you to eliminate java serialization which is error prone thanks to a tight coupling to the classpath.
Plus, there is only one serialization format for everything.