The problem is that among the maven dependencies (remember that this can be transitive) you have incompatible versions of jackson-datatype-joda and jackson-databind . Incompatible in the sense that the jackson-databind SerializationFeature class does not contain the WRITE_DURATIONS_AS_TIMESTAMPS field. To find out which dependencies you are using, you can run the following command in the terminal (or you can use the IDE plug-in to search and analyze the maven dependency tree):
mvn dependency:tree | grep databind
the result is likely to be something like this:
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.4.1:compile
The course version may change, but it’s important that the WRITE_DURATIONS_AS_TIMESTAMPS field is available only from version 2.5
You can exclude the transitive dependency as follows:
<dependency> <groupId>group.id</groupId> <artifactId>artifact-id</artifactId> <version>${artifact.version}</version> <exclusions> <exclusion> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </exclusion> </exclusions> </dependency>
If this is not a transitive dependency, you need to update the jackson-databind version.
source share