This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Problem with JTA transactions and OpenJPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Problem with JTA transactions and OpenJPA" Watch "Problem with JTA transactions and OpenJPA" New topic
Author

Problem with JTA transactions and OpenJPA

Stefan Berger
Greenhorn

Joined: Sep 13, 2011
Posts: 4
Hello,

I'm writing a little test application with JSF, CDI, EJB and JPA on JBoss 7. I have a JSF view, the backing bean holds a reference to an EJB which is injected. The EJB gets an EntityManager by injection creates and persists some data. I'm using OpenJPA 2.1.0 with a datasource defined in JBoss 7. The problem is that I always get the error "You cannot set autocommit during a managed transaction", although I do not change the autocommit settings in my code nor do I do any transaction handling in my code. All I do regarding database access is to call em.persist(...):





This is my persistence.xml file:


The definition of the datasource in JBoss 7:


The stacktrace:


Hope that somebody can help me!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with JTA transactions and OpenJPA
 
Similar Threads
How to solve the problem specification
Portal with Gatein Portlet Container
How to inject EJB beans with Spring DI.
JBoss AS 7.1.0 CR1b problem with hornetq-ra
Can't map to target entity property