ObjectDB ObjectDB

"No Persistence provider for EntityManager" in OSGI bundle.


Good Day.

I seem to have gotten a bit stuck while developing an OSGI bundle with ObjectDB.

Essentially it builds an OSGI bundle with an embedded instance of ObjectDB and then tries to deploy the bundle inside an application running an embedded OSGI server (Apache Felix). The STARTING phase seems to fail due to the below error.

Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named $objectdb/myDB.odb at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)

Attached is a sample application demonstrating this. (including the ant build script)

Any help would be much appreciated ;-)



Attached a new version of your project that works.

It required a small change in ObjectDB (build 2.3.2_02 is used) and some changes in your project (setting a classloader and adding imported packages to the manifest).

ObjectDB Support

Many thanks.

I suspected that it was something related to the classpath as I had a similar problem when using openJPA as an interim solution.

Its working perfectly now.



To post on this website please sign in.