This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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: 10141
    
165

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]
 
GeeCON Prague 2014
 
subject: JTA EntityManager cannot access a transactions