Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » No Persistence Services when called from rcp application(Persistence Services starts when called from main class but not from rcp application)
No Persistence Services when called from rcp application [message #1011424] Tue, 19 February 2013 14:53
Oliver Kolling is currently offline Oliver KollingFriend
Messages: 24
Registered: April 2010
Junior Member
Hello,

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);
System.out.println(((Utl) q.getSingleResult()).getMtr());


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?

Previous Topic:EclipseLink Download Error
Next Topic:No Persistence provider for EntityManager named default
Goto Forum:
  


Current Time: Tue Apr 16 19:15:00 GMT 2024

Powered by FUDForum. Page generated in 0.55103 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top