|No Persistence Services when called from rcp application [message #1011424]
||Tue, 19 February 2013 14:53
| Oliver Kolling
Registered: April 2010
I have an eclipse RCP application and and the DOM/Persistence Provider in a separate bundle. When I try to run the rcp app and try to call Persistence Service, I end up in
javax.persistence.PersistenceException: No Persistence provider for EntityManager named <myEntityManagerName>
For test pupose I created a Main with the same code (see below) calling the PS from inside the rcp app bundle and run it as stand-alone java app. Then I get the proper return from Persistence service: ServerSession(2562068)--EclipseLink, version: Eclipse Persistence Services - 2.4.1.v20121003-ad44345
EntityManager em = null;
String sqlQueryStr = "SELECT utl FROM Utl utl WHERE utl.cod = 'John Dow'";
em = MyEntityManager.getEntityManager();
Query q = em.createQuery(sqlQueryStr);
So, why is it that it finds the Persistence Provider when I call it from a stand-alone java main and not when I call it from a rcp application?
When I move the Persistence Provider inside the rcp app it works, too. So what do I
miss to make it work inside a separate bundle?
Powered by FUDForum
. Page generated in 0.04285 seconds