Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A JTA EntityManager cannot use getTransaction()  RSS feed

 
zabin shariff
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSF project in which I have JPA as ORM. I am getting the following error while executing the code:

error:


If I remove the line em.getTransaction().begin(), then also I am getting error which says "no transaction found"

my db2-ds.xml looks like:


And my persistence.xml looks like:


If I use DB2DS instead of JTA_DB2DS in persistence.xml then also there is no change in the behaviour.

Am I missing something???
 
zabin shariff
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have tried using UserTransaction too but still getting the same error. I don't know where I am going wrong. Can anybody suggest?
 
zabin shariff
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still struggling with this issue....can anybody help???
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!