question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Quarkus w/ hibernate ORM does not throw any exception when database is rolled-back on commit phase

See original GitHub issue

Describe the bug Quarkus with HibernateORM does not throw any exception although database is rolled back on the commit phase.

When Quarkus is combined with HibernateORM and narayana integrations, it also depends on agroal and agroal-narayana.

However, agroal-narayana does not throw appropriate exception on commit phase. (error code of javax.transaction.xa.XAException is not specified).

This leads Quarkus incompatible to RDBMSs which might roll back on commit phase.

Expected behavior throw javax.transaction.RollbackException in Transactionalnterceptor*

Actual behavior do nothing

To Reproduce Steps to reproduce the behavior:

  1. configure quarkus with hibernate-orm and narayana-jta
  2. throw any exception in jdbc driver on commit phase
  3. we cannot catch any exception about it

Environment (please complete the following information):

  • Output of uname -a or ver:
Darwin o-******-mac.local 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul  5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64
  • Output of java -version:
openjdk version "12.0.1" 2019-04-16
OpenJDK Runtime Environment (build 12.0.1+12)
OpenJDK 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
  • GraalVM version (if different from Java): Not Applicable

  • Quarkus version or git rev:

quarkusPlatformVersion=1.7.0.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
------------------------------------------------------------
Gradle 6.5
------------------------------------------------------------

Build time:   2020-06-02 20:46:21 UTC
Revision:     a27f41e4ae5e8a41ab9b19f8dd6d86d7b384dad4

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          12.0.1 (Oracle Corporation 12.0.1+12)
OS:           Mac OS X 10.15.6 x86_64

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Sannecommented, Apr 16, 2021

thanks @barreiro . Please when you upgrade Agroal it would help if you mark it with “Fixes #issuenumber” on the PR, that would help to track which versions have the bugfixes.

1reaction
barreirocommented, Apr 15, 2021

This issue was addressed in AG-158 with feedback from Narayana team. Quarkus 1.13.1 has this fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Transactions in Quarkus
The transaction will commit unless a runtime exception crosses the method boundary. You can override whether an exception forces the rollback or not...
Read more >
Is there any way to notify rollback-on-commit in quarkus ...
Is there any way to notify rollback-on-commit in quarkus-hibernate-orm in multitenancy DATABASE mode? Ask Question. Asked 2 years, 3 months ago.
Read more >
How to manage Transactions in Quarkus - Mastertheboss
This article launches you on a tour of Transaction Management in Quarkus applications by focusing on the standard declarative approach and ...
Read more >
Hibernate EntityManager User Guide - Red Hat Customer Portal
You may use a combination of all three together, annotations without EJB3 programming interfaces and lifecycle, or even pure native Hibernate, depending on...
Read more >
使用Quarkus 中的事务
Quarkus : 超音速亚原子Java. ... 如Hibernate ORM ,它会妥当设置好事务。 ... Annotated nested methods once a transaction has started will throw an exception.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found