EclipseLink Core 2.5.2 missing Import-Package java

2019-09-04 03:32发布

问题:

The EclipseLink bundle (org.eclipse.persistence/org.eclipse.persistence.core/2.5.2) is missing the import statement javax.xml.bind in its header entry of Import-Package. I get the same error described here: Glassfish 4 moxy eclipselink 2.5.2 oxm object graph troubles

I add to declare javax.xml.bind as bootdelegated in OSGi, otherwise EclipseLink MOXy is not working properly.

Is it possible to fix this?

回答1:

Fixed this bug in EclipseLink 2.5.3. Also, EclipseLink 2.6.0 does not contain this issue.

Thanks for creating the request.



回答2:

You can fix missing import with fragment bundles, see http://wiki.osgi.org/wiki/Fragment

If the host bundle has the following in its manifest:

Bundle-SymbolicName: org.eclipse.persistence.core
Bundle-Version: 2.5.2

then your fragment manifest should have:

Bundle-SymbolicName: org.eclipse.persistence.core.myfragment
Fragment-Host: org.eclipse.persistence.core; bundle-version="2.5.2"
Import-Package: javax.xml.bind