This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes JPA EntityManager lookup failure in Websphere7 environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JPA EntityManager lookup failure in Websphere7 environment" Watch "JPA EntityManager lookup failure in Websphere7 environment" New topic
Author

JPA EntityManager lookup failure in Websphere7 environment

Viji San
Ranch Hand

Joined: Aug 12, 2010
Posts: 35
Hi, I am trying to look up JPA EntityManager in DAO class in Websphere Application Server 7 environment and getting JNDI Name not found exception. I have configured to use Hibernate as JPA Persistence Provider.

My DAO class is below:



I tried with below provider properties information as well, but, the exception does not disappear


Trying to access DAO method in the below class.




Persistence.xml is below:



Exception:




What JNDI URI needs to be used to lookup JPA EntityManager in Websphere environment?
K Mansoor
Ranch Hand

Joined: Jan 10, 2006
Posts: 52
Did you ever figure this one out?
Viji San
Ranch Hand

Joined: Aug 12, 2010
Posts: 35
I couldn't figure it out yet. As a work around, I implemented EAO in stateless bean, so, I am getting EntityManager through contain DI. Some thing like below,



Please let me know if you could find it out. Thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JPA EntityManager lookup failure in Websphere7 environment
 
Similar Threads
Probelms with JNDI references
NO commit() in code, but getting "Operation Connection.commit is not allowed during a global transa"
EJB3 JNDI lookup in WAS7
JNDI Connection Pool problem with WAS 5.0.2 and Teradata
Connection Pooling and JDBC lookup.