general  

[pax-exam] Extra system packages being pulled into generated "org.osgi.framework.system.packages"

Eoghan Glynn
Wed, 27 Jan 2010 04:36:02 -0800

Hi Folks,

I'm noticing some extra system packages being pulled into the
"org.osgi.framework.system.packages" setting in then generated config.ini,
despite an explicit systemPackages list being provided in the core options
by the test.

This behaviour seems to depend on what's available in the JRE rt.jar. So for
example in Java 6, where the javax.xml.ws stuff has been newly added to the
rt.jar, I see the following additional packages added to the system
packages:

  javax.xml.ws <http://javax.xml.ws/>
,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi

Whereas when running the same test on Java 1.5, these additional packages
are absent from the "org.osgi.framework.system.packages" setting.

This causes a problem for me with certain bundles that have a
version-constrained dependency on javax.xml.ws, so I see failures like:

org.osgi.framework.BundleException: The bundle could not be resolved.
Reason: Package uses conflict: Import-Package: javax.xml.ws;
version=[2.1.0,3.0.0)"
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1313)
... etc.

Can this behaviour be supressed in any way?

Cheers,
Eoghan
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general