0

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?

Community
  • 1
  • 1
Herr-Herner
  • 491
  • 6
  • 22

2 Answers2

1

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
Martin Baumgartner
  • 3,524
  • 3
  • 20
  • 31
  • That sounds interesting... I will try this workaround. – Herr-Herner Dec 25 '14 at 15:31
  • When I was working on an osgi project, i always created an empty maven project which just created the empty jar but with the manifest. It was the easiest way to integrate the libary-fixes to the build lifecycle. The eclipse virgo bundlor and a template.mf will be big help. – Martin Baumgartner Dec 25 '14 at 20:06
0

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

Thanks for creating the request.

marcelv3612
  • 663
  • 4
  • 10