I'm developing an Eclipse4 RCP application which uses ObjectDB and have the following problem
after calling Persistence.createEntityManagerFactory("test.odb") :
javax.persistence.PersistenceException: No Persistence provider for EntityManager
I'm using the latest ObjectDB 2.6.2.b03. It is integrated in our target platform.
It is noticed that since 2.6.2.b02 there is no more integrated javax.persistence & javax.transaction.
The simplified project structure is the following one :
Project X (Plugin Project with a product file to start the application)
- product dependencies are added : objectdb, javax.persistence, javax.transaction
- javax.persistence is imported in the plugins manifest
after the bundle is activated I'm calling
which throws the error. I think it has something to do with the Classloading of the javax.Persistence und ObjectDB bundles and also tried Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader()); before the call of createEntityManager (this "trick" was mentioned here in the forum some time ago) but the error still occures.
I would highly appreciate if somebody could give me an advice how to fix that error. ObjectDB is a very nice database and we look forward to buy the commercial version of it.