Search code examples
javaosgiaemosgi-bundle

Package Installed in AEM 6.0 Web Console Bundles (OSGi Bundles) is Not Installing Properly (Status Should be Active not Installed)


Please help me on my concern wherein I tried to Install/Upload the recruitment-client-1.0.0.jar in AEM Web Console Bundles of AEM 6.0 and the status is just "Installed" that should be "Active", so when I tried to click play under Actions column, status is still "Installed" and has an error in log file seen below.

*FYI that it works before in CQ5 server instance.

org.apache.felix.http.jetty %bundles.pluginTitle: Cannot start (org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision com..wcm.recruitment-client [407.0] because it is exposed to package 'javax.xml.namespace' from bundle revisions org.apache.felix.framework [0] and com..commons.axissosgi.commons.axissosgi [402.1] via two dependency chains.

Chain 1:

com.**.wcm.recruitment-client [407.0] import: (osgi.wiring.package=javax.xml.namespace) | export: osgi.wiring.package=javax.xml.namespace org.apache.felix.framework [0]

Chain 2:

com..wcm.recruitment-client [407.0] import: (osgi.wiring.package=org.apache.axis) | export: osgi.wiring.package=org.apache.axis; uses:=javax.xml.namespace export: osgi.wiring.package=javax.xml.namespace com..commons.axissosgi.commons.axissosgi [402.1]) org.osgi.framework.BundleException: Uses constraint violation. Unable to resolve bundle revision com..wcm.recruitment-client [407.0] because it is exposed to package 'javax.xml.namespace' from bundle revisions org.apache.felix.framework [0] and com..commons.axissosgi.commons.axissosgi [402.1] via two dependency chains.

Chain 1:

com.**.wcm.recruitment-client [407.0] import: (osgi.wiring.package=javax.xml.namespace) | export: osgi.wiring.package=javax.xml.namespace org.apache.felix.framework [0]

Chain 2:

com..wcm.recruitment-client [407.0] import: (osgi.wiring.package=org.apache.axis) | export: osgi.wiring.package=org.apache.axis; uses:=javax.xml.namespace export: osgi.wiring.package=javax.xml.namespace com..commons.axissosgi.commons.axissosgi [402.1]

And to add, this is what it looks like in the OSGi bundle.

    ** recruitment webservice clientcom.**.wcm.recruitment-client
Symbolic Name   com.**.wcm.recruitment-client
Version 1.0.1.SNAPSHOT
Bundle Location inputstream:recruitment-client-1.0.1-SNAPSHOT.jar
Last Modification   Wed Jun 03 19:33:00 CST 2015
Start Level 20
Bundle Classpath    .,recruitment-ws-1.0.0.jar
Exported Packages   com.**.recruitment.client,version=1.0.1.SNAPSHOT
com.**.recruitment.ws,version=1.0.1.SNAPSHOT
Imported Packages   com.**.recruitment.client from com.**.wcm.recruitment-client (469)
com.**.recruitment.ws from com.**.wcm.recruitment-client (469)
com.**.wcm.config from com.**.wcm.**-wcm-cq5-core (446)
javax.xml.namespace from com.**.commons.axissosgi.commons.axissosgi (456)
javax.xml.rpc from com.**.commons.axissosgi.commons.axissosgi (456)
javax.xml.rpc.encoding from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.client from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.constants from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.description from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.encoding from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.encoding.ser from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.soap from com.**.commons.axissosgi.commons.axissosgi (456)
org.apache.axis.utils from com.**.commons.axissosgi.commons.axissosgi (456)
org.osgi.framework,version=[1.6,2) from org.apache.felix.framework (0)
org.slf4j,version=[1.6,2) from slf4j.api (22)
Manifest Headers    Bnd-LastModified: 1433331172696
Build-Jdk: 1.7.0_55
Built-By: 55954
Bundle-Activator: com.**.recruitment.Activator
Bundle-ClassPath: ., recruitment-ws-1.0.0.jar
Bundle-ManifestVersion: 2
Bundle-Name: ** recruitment webservice client
Bundle-SymbolicName: com.**.wcm.recruitment-client
Bundle-Version: 1.0.1.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Embed-Dependency: *; scope=compile|runtime
Embedded-Artifacts: recruitment-ws-1.0.0.jar; g="com.**.wcm"; a="recruitment-ws"; v="1.0.0"
Export-Package: com.**.recruitment.client; uses:="com.**.recruitment.ws"; version="1.0.1.SNAPSHOT", com.**.recruitment.ws; uses:="org.apache.axis.description, org.apache.axis.encoding, org.apache.axis.encoding.ser, javax.xml.namespace, javax.xml.rpc, org.apache.axis.client, org.apache.axis, org.apache.axis.constants, org.apache.axis.utils, org.apache.axis.soap, javax.xml.rpc.encoding"; version="1.0.1.SNAPSHOT"
Import-Package: com.**.recruitment.client, com.**.recruitment.ws, com.**.wcm.config, javax.xml.namespace, javax.xml.rpc, javax.xml.rpc.encoding, org.apache.axis, org.apache.axis.client, org.apache.axis.constants, org.apache.axis.description, org.apache.axis.encoding, org.apache.axis.encoding.ser, org.apache.axis.soap, org.apache.axis.utils, org.osgi.framework; version="[1.6, 2)", org.slf4j; version="[1.6, 2)"
Manifest-Version: 1.0
Service-Component: OSGI-INF/com.**.recruitment.client.impl.RecruitmentServiceImpl.xml
Tool: Bnd-1.50.0

Thanks


Solution

  • It seems that javax.xml.namespace is already in deployed by another bundle. You should exclude that on your setup. On your pom.xml, add a configuration to the maven-bundle-plugin. Something like this

    ...
    <Import-Package>
        !javax.xml.namespace,
        *
    </Import-Package>
    ...