[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6651) NPE when calling javax.persistence.Persistence.createEntityManagerFactory within a JTA/Managed transaction
Scott Marlow (JIRA)
noreply at atlassian.com
Tue Sep 13 12:03:05 EDT 2011
NPE when calling javax.persistence.Persistence.createEntityManagerFactory within a JTA/Managed transaction
----------------------------------------------------------------------------------------------------------
Key: HHH-6651
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6651
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 4.0.0.CR2
Reporter: Scott Marlow
Assignee: Steve Ebersole
Fix For: 4.0.0.CR3
Calling javax.persistence.Persistence.createEntityManagerFactory with an active JTA transaction, leads to an NPE and error "HHH00231:Schema export unsuccessful: java.sql.SQLException: You cannot set autocommit during a managed transaction!"
The is with a Persistence unit with transaction_type = JTA (the problem doesn't occur if transaction_type = RESOURCE_LOCAL since the JTA transaction is ignored for that).
I created a AS7 unit test here if that is helpful. https://github.com/scottmarlow/jboss-as/tree/bootstrap is the branch and https://github.com/scottmarlow/jboss-as/commit/f181d5e919c64d62b1e8ab5e455929159331d922 contains the change.
The NPE that the user is getting is shown here http://pastie.org/2526570
The user forum report is here http://community.jboss.org/message/626226
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list