Skip to main content
October 11, 2022
Solved

Using jackson dataformat xml, AEMaaCS, latest SDK, Java 11

I'm having OSGi issue when I'm trying to use com.fasterxml.jackson.dataformat.xml

 

Bundle is present in platform, installed from launchpad:resources/install/20/jackson-dataformat-xml-2.13.0.jar in active state

 

I've added this dependency in scope provided to parent pom and then included it into core, but complication fails and error is:

 

[ERROR] The analyser found the following errors for author and publish :
[ERROR] [api-regions-exportsimports] com...aem.core:1.0.0-SNAPSHOT: Bundle com.aem.core:1.0.0-SNAPSHOT is importing package(s) [com.fasterxml.jackson.dataformat.xml, com.fasterxml.jackson.dataformat.xml.annotation] in start level 20 but no bundle is exporting these for that start level. (......:1.0.0-SNAPSHOT)

 

Solution here was to add bundle into all package and embed it, this allowed me to install package. The issue is that bundle doesn't want to start:

 

11.10.2022 16:07:08.692 *WARN* [qtp737905289-756] org.apache.sling.feature.apiregions.impl.ResolverHookImpl API-Regions removed candidates [com.fasterxml.jackson.dataformat.jackson-dataformat-xml [496](R 496.2)] osgi.wiring.package; {bundle-symbolic-name=com.fasterxml.jackson.dataformat.jackson-dataformat-xml, bundle-version=2.13.0, version=2.13.0, osgi.wiring.package=com.fasterxml.jackson.dataformat.xml}[Regions: [], Feature: com.day.cq:cq-quickstart:slingosgifeature:aem-sites-graphql_cloudready_only:2022.9.8722.20220912T101352Z-220800] for requirement [com..aem.core [587](R 587.4)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.dataformat.xml)(version>=2.13.0)(!(version>=3.0.0))) as the requirement is in the following regions: [global] and in feature: []
11.10.2022 16:07:08.703 *ERROR* [FelixLogListener] LogService.org.apache.felix.http.jetty Bundles: Cannot start (org.apache.felix.log.LogException: org.osgi.framework.BundleException: Unable to resolve com..aem.core [587](R 587.4): missing requirement [com..aem.core [587](R 587.4)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.dataformat.xml)(version>=2.13.0)(!(version>=3.0.0))) Unresolved requirements: [[com..aem.core [587](R 587.4)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.dataformat.xml)(version>=2.13.0)(!(version>=3.0.0)))])
org.apache.felix.log.LogException: org.osgi.framework.BundleException: Unable to resolve com..aem.core [587](R 587.4): missing requirement [com..aem.core [587](R 587.4)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.dataformat.xml)(version>=2.13.0)(!(version>=3.0.0))) Unresolved requirements: [[com..aem.core [587](R 587.4)] osgi.wiring.package; (&(osgi.wiring.package=com.fasterxml.jackson.dataformat.xml)(version>=2.13.0)(!(version>=3.0.0)))]

 

Additionally when I look into Felix Console I see that dependency is fulfilled by already deployed package:

 

 

 

What can be the issue?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Saravanan_Dharmaraj
Saravanan_DharmarajAccepted solution
Community Advisor
October 11, 2022

This issue is similar to this one. Having the dependency library as embed and exclude its packages from Import-Package

https://stackoverflow.com/questions/30480508/karaf-maven-unable-to-resolve-missing-requirement-osgi-wiring-package

Have you tried it?

 

1 reply

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
October 11, 2022

This issue is similar to this one. Having the dependency library as embed and exclude its packages from Import-Package

https://stackoverflow.com/questions/30480508/karaf-maven-unable-to-resolve-missing-requirement-osgi-wiring-package

Have you tried it?

 

Translate