Installing EclipseLink OSGI bundles


A few days ago I tried to install the prepacked EclipseLink 1.1.0 osgi bundles. I wanted to see if the bundles runs well on the Apache Felix OSGI runtime. Unfortunately, it didn‘t work out-of-the-box, because of some missing package import declarations in the manifest files. After searching the bug database, I found this bug.
So I had to modify the EclipseLink bundles by myself to get it working:

I modified META-INF/MANIFEST.MF of the bundleorg.eclipse.persistence.jpa-1.1.0.jar by adding the missing Import-Packages: org.xml.sax, javax.xml.parsers, javax.sql, org.w3c.dom

- ../../META-INF/MANIFEST.MF 2009–03-09 15:10:08.000000000 +0100
+ MANIFEST.MF 2009–05-07 21:51:48.000000000 +0200
@ -41,6 +41,8 @
ional,org.osgi.framework;resolution:=optional,org.osgi.service.packag – eadmin;resolution:=optional
+ eadmin;resolution:=optional,org.xml.sax;resolution:=optional,javax.xm
+ l.parsers;resolution:=optional,javax.sql;resolution:=optional,org.w3c
+ .dom;resolution:=optional
HK2-Bundle-Name: org.eclipse.persistence:org.eclipse.persistence.jpa

In the org.eclipse.persistence.core-1.1.0 bundle I had to remove the version number from the import declarationorg.w3c.dom.

- ../../META-INF/MANIFEST.MF 2009–03-09 15:09:56.000000000 +0100
+ MANIFEST.MF 2009–05-07 22:04:28.000000000 +0200
@ -142,7 +142,7 @
“1.5.0“;resolution:=optional,javax.transaction;version=“1.1.0“;resolu – tion:=optional,org.w3c.dom;version=“3.0.0”;resolution:=optional
+ tion:=optional,org.w3c.dom;resolution:=optional
HK2-Bundle-Name: org.eclipse.persistence:org.eclipse.persistence.core
Premain-Class: org.eclipse.persistence.internal.jpa.deployment.JavaSEC

With the modifications mentioned above I was able to run (and use) the EclipseLink osgi bundles with Apache Felix.


Marco Rico Gomez is a passionate software developer located in Germany who likes to share his thoughts and experiences about software development and technologies with others.

blog comments powered by Disqus