OSGI, JPA
Trying to use JPA in OSGI always gives me the error “javax.persistence.PersistenceException: No Persistence provider for EntityManager named …”. Reason: Persistence.createEntityManagerFactory() uses the ClassLoader to load resources. It seems to be the ThreadContext ClassLoader. So in OSGI it fails due to the OSGI classloader tricks. Using the tricks given in http://lsd.luminis.nl/jpa-persistence-in-osgi-with-openjpa/ I got this to work. That […]
Read More OSGI, JPA