Hi there

Recently I run into an issue with OpenAPI implemenation (Swagger3 2.0.6) due to 
a dependency to JAXB 2.3 in Karaf 4.1.5. Some bundles require version 2.2 and 
Swagger 3 2.0.6 requires JAXB 2.3. This was the error message:


>>>

org.apache.karaf.features.internal.util.MultiException: Error restarting 
bundles:
Could not resolve module: party-api-service-wsdl [338]
  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation. 
Unable to resolve resource party-api-service-wsdl [osgi.identity; 
osgi.identity="party-api-service-wsdl"; type="osgi.bundle"; 
version:Version="1.0.3.SNAPSHOT"] because it is exposed to package 
'javax.xml.bind' from resources org.apache.servicemix.specs.jaxb-api-2.3 
[osgi.identity; osgi.identity="org.apache.servicemix.specs.jaxb-api-2.3"; 
type="osgi.bundle"; version:Version="2.3.0.1"] and org.eclipse.osgi 
[osgi.identity; osgi.identity="org.eclipse.osgi"; type="osgi.bundle"; 
version:Version="3.12.50.v20170928-1321"; singleton:="true"] via two dependency 
chains.

>>>


I saw that Karaf 4.2.3 supports JAXB 2.3. Is JAXB 2.2 still supported or is it 
not possible to support both JAXB version in one Karaf runtime? IMHO, it should 
be sufficient to ensure that the import defintion enforces a version number to 
properly resolve it. But maybe I miss something.


Instead of something like this:

Import-Package =
javax.xml.bind;version="[2.2,3)",
javax.xml.bind.annotation;version="[2.2,3)",
javax.xml.bind.annotation.adapters;version="[2.2,3)",



I should have this:

Import-Package =
javax.xml.bind;version="[2.2,2.3)",
javax.xml.bind.annotation;version="[2.2,2.3)",
javax.xml.bind.annotation.adapters;version="[2.2,2.3)",

The only solution at the moment is to use Swagger3 2.0.0 (which doesn't have 
the JAXB 2.3 dependency) but I might run into another issue due to the lack of 
bug fixes in Swagger3 2.0.x.


Thanks a lot for your feedback

Oliver

As a recipient of an email from Talend, your contact personal data will be on 
our systems. Please see our contacts privacy notice at Talend, Inc. 
<https://www.talend.com/contacts-privacy-policy/>


Reply via email to