14

I am working on Java Springboot project which is deployed on Weblogic (12C) I am getting below error: Message icon - Error java.lang.ClassNotFoundException:com.fasterxml.jackson.core.exc.InputCoercionException

I have following dependency in POM.xml:

            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.10.1</version>
        </dependency>```

Mandar Dharurkar
  • 267
  • 1
  • 5
  • 16
Manjunath Kb
  • 159
  • 1
  • 1
  • 4

5 Answers5

14

Add the following dependency to your pom.xml

<dependency>
    <groupId>com.fasterxml.jackson.core</groupId>
    <artifactId>jackson-core</artifactId>
    <version>2.10.1</version>
</dependency>
Nick
  • 805
  • 5
  • 14
5

I had the same issue, i had updated the jackson-databind jar to 2.11.0, whereas jackson-core was using 2.6.6. Jackson-core is the base on which Jackson data-binding package builds on.

If you're using maven for your dependency management, just include jackson-databind jar dependency and it should inject jackson-core dependency in your classpath as it has transitive dependency on this

Identify the jackson-core and jackson-databind version, by running this command in commandprompt of your project folder. For maven : mvn dependency:tree

E.g of my dependencies

com.fasterxml.jackson.core:jackson-databind:jar:2.11.0:compile com.fasterxml.jackson.core:jackson-core:jar:2.6.6:test

I am using 2.6.6 for running my test cases, so the scope is test.

So Solution, upgraded the jackson-core to 2.11.0 and build it. It will pass.

the_code
  • 85
  • 2
  • 10
3

I had this same issue, using the dataformat and databind libraries. It seems that in the new update you have to add the core library in order for the others to work:

compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.1'
EBAq
  • 31
  • 1
0

Not sure if this has to do something with version of jackson you are using 2.10.1 as this version contains java 9 specifics , which version of java are you on?

Xuhd
  • 11
  • 2
0
> <dependency>
>     <groupId>com.fasterxml.jackson.dataformat</groupId>
>     <artifactId>jackson-dataformat-xml</artifactId>
>     <version>2.9.8</version> </dependency>

Downgraded from 2.11.1 to above in eclipse.

Arindam
  • 675
  • 8
  • 15