EclipseLink cant find PersistenceUnit [message #385445] |
Thu, 05 February 2009 13:11  |
Eclipse User |
|
|
|
I'm trying to setup eclipseLink, using the latest code from svn. When I
run the code I get a javax.persistence.PersistenceException: No
persistence provider for EntityManager named punit
Im calling EclipseLink with this line
The call to init goes with the classLoader of the Activator. Like
Activator.class.getClassLoader();
public void init(ClassLoader classLoader)
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PersistenceUnitProperties.CLASSLOADER, classLoader);
EntityManagerFactory emf =
Persistence.createEntityManagerFactory("punit", properties); <-- Here is
where I get the exception from my code
..
..
}
In Manifest.mf of this bundle that contains persistence.xml
I have JPA-PersistenceUnits: punit
I have tracked the exception trough eclipseLink code and it get another
classLoader on JavaSECMPInitializer at method initializeClassLoader
public void initializeClassLoader(PersistenceInitializationHelper
persistenceHelper){
initializationClassLoader = persistenceHelper(null, null);
}
After this when eclipseLink tries to load persistence.xml file with this
classLoader I get the exception.
I'm been checking many things, any ideas.
Thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.07790 seconds