Hello,
Can anyone tell me what is going on with my project setup? I have created some entities which are mapped from DB2 database, and created an entity manager class like this:
@JPAManager(targetEntity=au.abc.ejb.entity.MyEntityManager.class) @SuppressWarnings("unchecked") public class MyEntityManager { @PersistenceUnit private EntityManagerFactory emf; ....
} I got the following runtime exception:
18/02/11 11:25:32:100 EST 00000024 BusinessExcep E CNTR0019E: EJB threw an unexpected (non-declared) exception during invocation of method "getLocalProperty". Exception data: javax.ejb.EJBException: Injection failure; nested exception is: java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=ABC_V1#ABC_EJB_V1.jar#gpps java.lang.IllegalStateException: EntityManagerFactory has not been created for PU : PuId=ABC_V1#ABC_EJB_V1.jar#gpps at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:1362) at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerPool(JPAPUnitInfo.java:1554) at com.ibm.ws.jpa.management.JPATxEntityManager.<init>(JPATxEntityManager.java:156) at com.ibm.ws.jpa.management.JPAComponentImpl.getEntityManager(JPAComponentImpl.java:1043) at com.ibm.ws.util.JPAJndiLookupObjectFactory.getObjectInstance(JPAJndiLookupObjectFactory.java:151) ...
I may be missing something in my persisence.xml file. How to setup persistence.xml file to reflect MyEntityManager?
Thank you in advance for any suggestion and help.
Sam.
|