aspose file tools*
The moose likes JBoss/WildFly and the fly likes JTA EntityManager cannot access a transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JTA EntityManager cannot access a transactions" Watch "JTA EntityManager cannot access a transactions" New topic
Author

JTA EntityManager cannot access a transactions

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

How do you configure a Hibernate EntityManager for a JTA data source? I'm using JBoss 4.2.3.GA, Hibernate 4.1.5.SP1, Hibernate validator 4.3.0.Final, and MySQL 5.5. Here's my $JBOSS_HOME/server/default/deploy/mysql-ds.xml JTA data source configuration …



I'm trying to deploy a JAR file. Here's my META-INF/persistence.xml …



Here's how I try and run a basic transaction, but I'm getting a "JTA EntityManager cannot access a transactions" exception. Full stack trace is below. What am I missing here?



The ugly exception …



Thanks, - Dave
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9341
    
110

All it's trying to say (in unclear terms) is that you can't call getTransaction() method on a JTA entitymanager http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html#getTransaction%28%29

[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JTA EntityManager cannot access a transactions
 
Similar Threads
JPA,/mysql/JBoss and a big head ache
EJB 3.0 : Could not enlist in transaction on entering meta-aware object
JBoss/JPA/Spring Question - What is the JNDI Name for the EntityManager
Requesting help in connecting a DataSource(DSSDEV)
EJB3 entity bean