felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan H <hussdl1985-fe...@yahoo.de>
Subject Embedding Hibernate in an OSGi bundle using maven-bundle-plugin is hard
Date Mon, 05 Apr 2010 00:01:46 GMT
Has anyone managed to embed Hibernate within their bundle using Maven
and maven-bundle-plugin? I'm getting errors that seem to be the result
of bad manifest "Import-Package" sections:

----
ERROR: Error starting file:/C:/dev/felix/bundle/kurt-handler-a-1.0.0.jar
(org.osgi.framework.BundleException: Unresolved
 constraint in bundle de.huss.kurt-handler-a [2]: package;
(package=com.sun.jdmk.comm))
org.osgi.framework.BundleException: Unresolved constraint in bundle
de.huss.kurt-handler-a [2]: package; (package=com.su
n.jdmk.comm)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3295)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1653)
        at
org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1124)
        at
org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
        at java.lang.Thread.run(Thread.java:619)
----

There is a lot of guesswork involved, but I think that the bundle plugin
does not handle the <exclusions> node of a dependency and adds a package
import to the manifest anyway. It also seems possible to me that the
bundle plugin is adding imports for dependencies that are flagged as
optional. I've attached the pom.xml and the generated manifest for those
who care.

Another thought: maybe I'm missing some magic Maven artifact that I
could import to get a working Hibernate library for OSGi environments?

Thank you very much in advance!
-Dan

Mime
View raw message