Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z

I was getting the exactly same issue. I was using Maven for dependency management and had added dependency for jackson-databind module only like this

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-databind</artifactId>
    <version>${jackson.version}</version>
</dependency>

and then I resolved it by doing this.. I added its transitive dependencies explicitly with the same jackson.version mentioned for each of them in the pom.xml file, as guided here

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-annotations</artifactId>
    <version>${jackson.version}</version>
</dependency>
<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>${jackson.version}</version>
</dependency>

I came here with a similar issue on Google App Engine. Here is how I fixed it.

First I ran:

mvn dependency:tree

To find who is using the older version. I then excluded that from the offending dependency like so:

<dependency>
    <groupId>com.google.appengine.tools</groupId>
    <artifactId>appengine-gcs-client</artifactId>
    <version>0.6</version>
    <exclusions>
        <exclusion>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Next I added the newer version of the dependency in my pom.xml:

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.8.7</version>
</dependency>

Hope this help others who stumble here.


I had the same issue. There was some incompatibility between the jackson-version 2.6.3 and another dependency (graphaware-framework-embedded).

I could resolve the issue by simply removing the dependency on jackson in my own pom and just let the other dependency load whatever jackson-version it needed.

Tags:

Java

Jackson