[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-7215) NullPointerException in JtaTransaction when trying mark transaction for rollback

Adi Sesha Reddy (JIRA) noreply at atlassian.com
Tue Apr 24 08:55:50 EDT 2012


     [ https://hibernate.onjira.com/browse/HHH-7215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adi Sesha Reddy updated HHH-7215:
---------------------------------

    Attachment: UnqiueConstraintVoilationJtaTest.java

Added test with complete setup of the issue.Place this file under '/hibernate-core/src/matrix/java/org/hibernate/test/annotations/' to run it. Notice at line 87.The cause of RollbackException will be NullPointerException. 

> NullPointerException in JtaTransaction when trying mark transaction for rollback
> --------------------------------------------------------------------------------
>
>                 Key: HHH-7215
>                 URL: https://hibernate.onjira.com/browse/HHH-7215
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.0.1, 4.1.0, 4.1.1
>            Reporter: Adi Sesha Reddy
>              Labels: transaction
>         Attachments: BasicDrivingTest.java, UnqiueConstraintVoilationJtaTest.java
>
>
> The issues is similar to this https://community.jboss.org/thread/197482. Notice 'hibernate.transaction.jta.platform' and 'hibernate.transaction.factory_class' properties. Here Hibernate is joining existing transaction. SynchronizationCallbackCoordinatorImpl tries to mark transaction for rollback when exception occurs, the chain of calls results in NullPointerException at  TransactionCoordinatorImpl.setRollbackOnly(). To simulate the scenario, I modified BasicDrivingTest(https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/test/transaction/jta/BasicDrivingTest.java) which is attached with this issue(check line 76)

--
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