[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-6651) performing SchemExport within JTA/Managed transaction leads to error attempting to set auto-commit

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Sep 14 14:34:07 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6651?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole updated HHH-6651:
--------------------------------

    Summary: performing SchemExport within JTA/Managed transaction leads to error attempting to set auto-commit  (was: NPE when calling javax.persistence.Persistence.createEntityManagerFactory within a JTA/Managed transaction)

> performing SchemExport within JTA/Managed transaction leads to error attempting to set auto-commit
> --------------------------------------------------------------------------------------------------
>
>                 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.
> Correction, the user forum is referencing a different problem.  The NPE that the user is getting is really shown here http://pastie.org/2527178
> 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