Hello, I'm using equinox as osgi container and aries.jax.rs.whiteboard to host our rest API and recently I see the following dependency chain split when launching:
RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] and org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] via two dependency chains. Chain 1: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] Chain 2: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] require: (&(osgi.contract=JavaAnnotation)(version=1.3.0)) | provide: osgi.contract: JavaAnnotation org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource com.castortech.iris.ba.web.filters [osgi.identity; osgi.identity="com.castortech.iris.ba.web.filters"; type="osgi.bundle"; version:Version="1.0.0.qualifier"] because it is exposed to package 'javax.annotation' from resources org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] and org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] via two dependency chains. Chain 1: com.castortech.iris.ba.web.filters [osgi.identity; osgi.identity="com.castortech.iris.ba.web.filters"; type="osgi.bundle"; version:Version="1.0.0.qualifier"] require: (&(osgi.wiring.bundle=org.apache.servicemix.specs.annotation-api-1.3)(bundle-version>=1.3.0)) | provide: osgi.wiring.bundle: org.apache.servicemix.specs.annotation-api-1.3 org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] Chain 2: com.castortech.iris.ba.web.filters [osgi.identity; osgi.identity="com.castortech.iris.ba.web.filters"; type="osgi.bundle"; version:Version="1.0.0.qualifier"] import: (osgi.wiring.package=org.keycloak.jaxrs) | export: osgi.wiring.package=org.keycloak.jaxrs; uses:=javax.annotation org.keycloak.jaxrs-oauth-client [osgi.identity; osgi.identity="org.keycloak.jaxrs-oauth-client"; type="osgi.bundle"; version:Version="4.6.0.Final"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] and org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] via two dependency chains. Chain 1: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] Chain 2: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] require: (&(osgi.contract=JavaAnnotation)(version=1.3.0)) | provide: osgi.contract: JavaAnnotation org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource com.castortech.iris.ba.web.filters [osgi.identity; osgi.identity="com.castortech.iris.ba.web.filters"; type="osgi.bundle"; version:Version="1.0.0.qualifier"] because it is exposed to package 'javax.annotation' from resources org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] and javax.annotation-api [osgi.identity; osgi.identity="javax.annotation-api"; type="osgi.bundle"; version:Version="1.3.0"] via two dependency chains. Chain 1: com.castortech.iris.ba.web.filters [osgi.identity; osgi.identity="com.castortech.iris.ba.web.filters"; type="osgi.bundle"; version:Version="1.0.0.qualifier"] require: (&(osgi.wiring.bundle=org.apache.servicemix.specs.annotation-api-1.3)(bundle-version>=1.3.0)) | provide: osgi.wiring.bundle: org.apache.servicemix.specs.annotation-api-1.3 org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] Chain 2: com.castortech.iris.ba.web.filters [osgi.identity; osgi.identity="com.castortech.iris.ba.web.filters"; type="osgi.bundle"; version:Version="1.0.0.qualifier"] import: (osgi.wiring.package=org.keycloak.jaxrs) | export: osgi.wiring.package=org.keycloak.jaxrs; uses:=javax.annotation org.keycloak.jaxrs-oauth-client [osgi.identity; osgi.identity="org.keycloak.jaxrs-oauth-client"; type="osgi.bundle"; version:Version="4.6.0.Final"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation javax.annotation-api [osgi.identity; osgi.identity="javax.annotation-api"; type="osgi.bundle"; version:Version="1.3.0"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] and org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] via two dependency chains. Chain 1: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] Chain 2: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] require: (&(osgi.contract=JavaAnnotation)(version=1.3.0)) | provide: osgi.contract: JavaAnnotation org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] and org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] via two dependency chains. Chain 1: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] Chain 2: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] require: (&(osgi.contract=JavaAnnotation)(version=1.3.0)) | provide: osgi.contract: JavaAnnotation org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] because it is exposed to package 'javax.annotation' from resources org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] and org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] via two dependency chains. Chain 1: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation org.eclipse.osgi [osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; version:Version="3.12.0.v20170512-1932"; singleton:="true"] Chain 2: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] require: (&(osgi.contract=JavaAnnotation)(version=1.3.0)) | provide: osgi.contract: JavaAnnotation org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"]) RESOLVER: Candidate permutation failed due to a conflict between imports; will try another if possible. (Uses constraint violation. Unable to resolve resource org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] because it is exposed to package 'javax.annotation' from resources javax.annotation-api [osgi.identity; osgi.identity="javax.annotation-api"; type="osgi.bundle"; version:Version="1.3.0"] and org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"] via two dependency chains. Chain 1: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] import: (osgi.wiring.package=javax.annotation) | export: osgi.wiring.package: javax.annotation javax.annotation-api [osgi.identity; osgi.identity="javax.annotation-api"; type="osgi.bundle"; version:Version="1.3.0"] Chain 2: org.apache.aries.jax.rs.whiteboard [osgi.identity; osgi.identity="org.apache.aries.jax.rs.whiteboard"; type="osgi.bundle"; version:Version="1.0.1"] require: (&(osgi.contract=JavaAnnotation)(version=1.3.0)) | provide: osgi.contract: JavaAnnotation org.apache.servicemix.specs.annotation-api-1.3 [osgi.identity; osgi.identity="org.apache.servicemix.specs.annotation-api-1.3"; type="osgi.bundle"; version:Version="1.3.0.1"]) It look like org.eclipse.osgi is a uber that provide all the osgi specs used by equinox and org.apache.servicemix.specs.annotation-api-1.3 is the partial spec that come with the aries.jax.rs.whiteboard implementation and finally the javax.annotation-api is the generic api. Should I only use the API that come with the impl in my launch to avoid this kind of dependency mix up? Hope to get some insight on this Thai
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev