Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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:

2022-10-11_16-56-49.png

jackson-is-up.png

 

What can be the issue?

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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-...

Have you tried it?

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

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-...

Have you tried it?