Installing EclipseLink OSGI bundles

2009-05-08

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 @
;resolution:=optional,org.apache.tools.ant;version=“1.6.0“;resolution
:=optional,org.apache.tools.ant.types;version=“1.6.0”;resolution:=opt
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 @
javax.persistence.spi;version=“1.0.0“;resolution:=optional,javax.reso
urce;version=“1.5.0“;resolution:=optional,javax.resource.cci;version=
“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
MPInitializerAgent

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


me

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