Hi everybody!
I’m writing an OpenFire plugin and in a servlet, I need to connect to another MySQL database.
When I want an EntityManager, I create a factory using:
Persistence.createEntityManagerFactory(“myPersistenceUnit”);
I have in my plugin repository a file “META-INF/persistence.xml” (and the same in a jar in librairies) but I always got this exception:
javax.persistence.PersistenceException: No Persistence provider for EntityManager named lmcPersistenceUnit
Is there a tip? Can I know where this persistence file is searched?
Thanks a lot in advance!
Regards,
Samuel ROZE.