ClassNotFoundException: com.fasterxml.jackson.databind.module.SimpleModule

43 views Asked by At

We are in the process of our platform upgrade and use apache Karaf 4.4.3 to deploy bundles. A specific custom bundle has dependencies for fasterxml.jason in the pom.xml and also in the tag of the maven-bundle-plugin as : <Import-Package>com.fasterxml.jackson.*</Import-Package>.

The dependency version of jackson in the pom.xml is 2.12.7 :

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

The dependency version of spring-batch-core is 4.3.7

Also, the jackson-databind jar with com.fasterxml.jackson.databind.module.SimpleModule is seen in the custom kar file after successful build.

Though the build is successful but the deployment of bundle on Karaf fails with the error :

Caused by: java.lang.ClassNotFoundException: **com.fasterxml.jackson.databind.module.SimpleModule not found by org.apache.servicemix.bundles.spring-batch-core** [353]
        at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1591) ~[?:?]
        at org.apache.felix.framework.BundleWiringImpl.access$300(BundleWiringImpl.java:79) ~[?:?]
        at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1976) ~[?:?]
        at java.lang.ClassLoader.loa
0

There are 0 answers