-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: EntityManagerFactory has not been created for PU
PostPosted: Thu Feb 17, 2011 8:58 pm 
Regular
Regular

Joined: Fri Feb 04, 2011 8:34 pm
Posts: 66
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.


Top
 Profile  
 
 Post subject: Re: EntityManagerFactory has not been created for PU
PostPosted: Fri Feb 18, 2011 11:40 am 
Regular
Regular

Joined: Fri Feb 04, 2011 8:34 pm
Posts: 66
Any other way to resolve this error?

Thanks
Sam


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.