Including com.fasterxml.jackson dependency - Causing errors | Community
Skip to main content
February 9, 2016

Including com.fasterxml.jackson dependency - Causing errors

  • February 9, 2016
  • 4 replies
  • 21988 views

I've added the following dependencies to my pom file

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

When I start my AEM server, I constantly get the following error ..

09.02.2016 11:41:55.297 *ERROR* [FelixStartLevel] ERROR: Error starting jcrinsta
ll:/apps/ewcm/install/ewcm.global.core-1.0.44-SNAPSHOT.jar (org.osgi.framework.B
undleException: Unresolved constraint in bundle ewcm.global.core [457]: Unable t
o resolve 457.7: missing requirement [457.7] osgi.wiring.package; (&(osgi.wiring
.package=com.fasterxml.jackson.core.type)(version>=2.6.0)(!(version>=3.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle ewcm.global.
core [457]: Unable to resolve 457.7: missing requirement [457.7] osgi.wiring.pac
kage; (&(osgi.wiring.package=com.fasterxml.jackson.core.type)(version>=2.6.0)(!(
version>=3.0.0)))
        at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:398
0)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2043)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1297)

        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStart
LevelImpl.java:304)
        at java.lang.Thread.run(Unknown Source)

Additionally, when I look in the system/console it says

com.fasterxml.jackson.core.type,version=[2.6,3) -- Cannot be resolved
com.fasterxml.jackson.databind,version=[2.6,3) -- Cannot be resolved

Thank you in advance for helping with this issue.

-Dean
            

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Lokesh_Shivalingaiah
February 9, 2016

Goto http://<host>:<port>/system/console/bundles and see if all these 3 dependency bundles exists or not. If not, upload these bundles manually and it should resolve.

Post your pom.xml to see what is missing.

February 9, 2016

I've attached the pom.xml

Checked system/console/bundles ... None of those bundles are deployed ...

I've attached the MANIFEST.MF as well.

Thank you for your help.

-Dean

Lokesh_Shivalingaiah
February 9, 2016

While I take a look at it, you can download these bundles here [1] and upload it manually from the console and check if that resolves the issue

[1] http://mvnrepository.com/artifact/com.fasterxml.jackson.core

ronnyfm
June 10, 2016

Try:

<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <configuration> <instructions> <Export-Package> com.fasterxml.jackson.* </Export-Package> ... ... ... </instructions> </configuration> </plugin>

You need to export the package.

August 11, 2017

I tried this. It does resolves the bundle issue but it causes the services to stop.

JoseBerciano
October 4, 2017

Currently facing the same issue here in AEM 6.3 as mentioned in the first post.

com.fasterxml.jackson.databind,version=[2.9,3) -- Cannot be resolved

I am using the following dependency in my parent pom

<dependency>

<groupId>com.fasterxml.jackson.core</groupId>

<artifactId>jackson-databind</artifactId>

<version>2.9.1</version>

</dependency>

Downloading the package jackson-databind-2.9.1.jar and installing via package Install/update seems to be fixing the issue, although I was hoping to automate this process in the Maven build

I tried <Import-Package></Import-Package> but I could not get it to work.

Any suggestions?

ronnyfm
October 4, 2017

Hi,

Did you try the export bundle as I suggest in a previous post?

January 15, 2019

Hi,

One solution, that we use in our project is :

  • Add jackson dependencies with maven scope provided

<!-- JACKSON -->
<dependency>

   <groupId>com.fasterxml.jackson.core</groupId>

   <artifactId>jackson-annotations</artifactId>

   <version>${jackson_version}</version>

   <scope>provided</scope>

</dependency>

<dependency>

   <groupId>com.fasterxml.jackson.core</groupId>

   <artifactId>jackson-core</artifactId>

   <version>${jackson_version}</version>

   <scope>provided</scope>

</dependency>

<dependency>

   <groupId>com.fasterxml.jackson.core</groupId>

   <artifactId>jackson-databind</artifactId>

   <version>${jackson_version}</version>

   <scope>provided</scope>

</dependency>

  • Embed jackson dependencies to your package via content-package-maven-plugin to avoid uploading third party jar via osgi console package install / update

<build>

   <plugins>

   <plugin>

   <artifactId>maven-clean-plugin</artifactId>

   </plugin>

   <plugin>

   <groupId>com.day.jcr.vault</groupId>

   <artifactId>content-package-maven-plugin</artifactId>

   <configuration>

   <embeddeds>

   <embedded>

   <groupId>com.fasterxml.jackson.core</groupId>

   <artifactId>jackson-annotations</artifactId>

   <target>/apps/${app-folder}/install</target>

   </embedded>

   <embedded>

   <groupId>com.fasterxml.jackson.core</groupId>

   <artifactId>jackson-core</artifactId>

   <target>/apps/${app-folder}/install</target>

   </embedded>

   <embedded>

   <groupId>com.fasterxml.jackson.core</groupId>

   <artifactId>jackson-databind</artifactId>

   <target>/apps/${app-folder}/install</target>

   </embedded>

   </embeddeds>

   </configuration>

   </plugin>

   </plugins>

</build>