Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 424968

Summary: org.eclipse.jst.ws.jaxws.core bundle is causing initial conflicts when jaxb-api 2.2.6 is installed
Product: [WebTools] WTP Webservices Reporter: Shane Clarke <shane_clarke>
Component: jst.ws.jaxwsAssignee: Shane Clarke <shane_clarke>
Status: RESOLVED FIXED QA Contact: Shane Clarke <shane_clarke>
Severity: normal    
Priority: P3 CC: ccc, michael.adada
Version: 3.5.1   
Target Milestone: 3.5.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on: 421408    
Bug Blocks:    

Description Shane Clarke CLA 2014-01-06 15:58:17 EST
+++ This bug was initially created as a clone of Bug #421408 +++

When using jaxb-api of version 2.2.6 there are some initial conflict in the "org.eclipse.jst.ws.jaxws.core" bundle.
This causes a slow start-up time of eclipse (when using the -clean parameter) and may result in unresolved bundles in certain cases.

This issue happens since jaxb-api of version 2.2.6 has some uses constraints on packages that it did not have with version 2.1.9 that is delivered with eclipse.
The MANIFEST of jaxb-api 2.1.9 contains the following:
Export-Package: javax.xml.bind;version="2.1",javax.xml.bind.annotation
 ;version="2.1",javax.xml.bind.annotation.adapters;version="2.1",javax
 .xml.bind.attachment;version="2.1",javax.xml.bind.helpers;version="2.
 1",javax.xml.bind.util;version="2.1"

While jaxb-api 2.2.6 has additional uses constraints:
Export-Package: javax.xml.bind;uses:="javax.xml.validation,javax.xml.n
 amespace,javax.xml.datatype,javax.xml.transform,javax.xml.bind.annota
 tion,javax.xml.transform.stream,org.w3c.dom,javax.xml.bind.attachment
 ,javax.xml.stream,javax.xml.bind.annotation.adapters,org.xml.sax";ver
 sion="2.2.6",javax.xml.bind.helpers;uses:="javax.xml.bind.annotation.
 adapters,javax.xml.transform.dom,org.w3c.dom,org.xml.sax,javax.xml.bi
 nd.attachment,javax.xml.stream,javax.xml.transform,javax.xml.transfor
 m.stream,javax.xml.validation,javax.xml.transform.sax,javax.xml.bind,
 javax.xml.parsers";version="2.2.6",javax.xml.bind.util;uses:="javax.x
 ml.transform.sax,javax.xml.bind,org.xml.sax,org.xml.sax.ext,org.xml.s
 ax.helpers";version="2.2.6",javax.xml.bind.annotation;uses:="javax.xm
 l.transform,javax.xml.bind,javax.xml.parsers,javax.xml.transform.dom,
 org.w3c.dom";version="2.2.6",javax.xml.bind.annotation.adapters;uses:
 ="javax.xml.bind";version="2.2.6",javax.xml.bind.attachment;uses:="ja
 vax.activation";version="2.2.6"


The "org.eclipse.jst.ws.jaxws.core" bundle defines an Import-Package of javax.xml.bind.annotation;version="2.1.0"
With the new jaxb-api version available this will force the "org.eclipse.jst.ws.jaxws.core" bundle to also use the following packages of the same jaxb-api version:
* javax.xml.bind.attachment
* javax.xml.bind.annotation.adapters
* javax.xml.bind

However it also has the constraint "Require-Bundle: org.eclipse.core.runtime" which reexports the system.bundle and with it all the javax.xml.bind packages and the rest of the system packages.

To easily reproduce this issue you can replace the javax.xml.bind_2.1.9 bundle with the following one:
http://repo1.maven.org/maven2/javax/xml/bind/jaxb-api-osgi/2.2.6/jaxb-api-osgi-2.2.6.jar
This will cause the "org.eclipse.jst.ws.jaxws.core" bundle and all the bundles depending on it to be unresolved.

Any one of the following suggestions can be used to resolve this issue:
1. In the bundle "org.eclipse.core.runtime" remove the attribute visibility:=reexport of the system bundle
2. In the bundle "org.eclipse.jst.ws.jaxws.core" remove the version constraint if it is not required
3. In the bundle "org.eclipse.jst.ws.jaxws.core" add new Import-Package constraints with the same version for packages "javax.xml.bind.attachment, javax.xml.bind.annotation.adapters, javax.xml.bind"

Although the first suggestion would probably be the correct solution it is probably not possible since it will break other bundles that relay on this behavior.

Thanks,
Michael Adada
Software AG Designer Eclipse Framework team
Comment 1 Shane Clarke CLA 2014-01-09 15:36:39 EST
Fix committed.