Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ARJUNA016108: Wrong transaction on thread" whennested transactions throws Exception #13776

Closed
Postremus opened this issue Dec 9, 2020 · 6 comments
Labels
env/windows Impacts Windows machines kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.

Comments

@Postremus
Copy link
Member

Postremus commented Dec 9, 2020

Describe the bug
I have nested transactions in my applications. The service has its own transaction (REQUIRES_NEW). It calls a helper class also having a REQUIRES_NEW.

If for any reason the nested transaction throws a PersistenceException (for example, optimisticlocking, or field value too big), I get multiple log outputs which are not correct in my opinion.

"SqlExceptionHelper" just logs the exception getMessage.
"com.arj.ats.arjuna" just logs the PersistenceException as a warn. #13854
I then catch the PersistenceException in "org.acm.ExampleSchedulerService" - this would normally lead to an additional error log.

After all these logs, an "java.lang.RuntimeException: ARJUNA016108: Wrong transaction on thread" RuntimeException is thrown.
You can "fix" this message, if you remove the Transactional from ExampleSchedulerService.

At the end, I also get messages from the transaction reaper. It might be that the outer transaction is never closed correctly.
(fixed by #13855)

Expected behavior
These logs may be a bit too much, since they all just contain the same information. I expected to only have a catchable PersistenceException.

Additionally, the "ARJUNA016108" may need to get fixed inside quarkus.
I attached my debugger at this position:

if (tx != tm.getTransaction()) {
throw new RuntimeException(jtaLogger.i18NLogger.get_wrong_tx_on_thread());
}

and noticed that tm.getTransaction() returned null. Is the outer transaction closed after the inner one is rolled back?

Actual behavior

2020-12-09 13:54:50,533 WARN  [org.hib.eng.jdb.spi.SqlExceptionHelper] (Quarkus Main Thread) SQL Error: 22001, SQLState: 22001
2020-12-09 13:54:50,545 ERROR [org.hib.eng.jdb.spi.SqlExceptionHelper] (Quarkus Main Thread) Wert zu gross / lang für Feld "NAME VARCHAR(1) NOT NULL": "'dbb7648e-0eaf-4c5c-b22d-3866bf347d0d' (36)"
Value too long for column "NAME VARCHAR(1) NOT NULL": "'dbb7648e-0eaf-4c5c-b22d-3866bf347d0d' (36)"; SQL statement:
insert into ExampleParentEntity (name, version, ID) values (?, ?, ?) [22001-197]
2020-12-09 13:54:50,550 WARN  [com.arj.ats.arjuna] (Quarkus Main Thread) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0a28f814:e8fa:5fd0c91a:2, org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization@5d189a63 >: javax.persi
stence.PersistenceException: org.hibernate.exception.DataException: could not execute statement
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188)
        at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1366)
        at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:453)
        at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3212)
        at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2380)
        at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:447)
        at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.beforeCompletion(JtaTransactionCoordinatorImpl.java:355)
        at org.hibernate.resource.transaction.backend.jta.internal.synchronization.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:47)
        at org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:37)
        at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:360)
        at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:91)
        at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1295)
        at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
        at io.quarkus.narayana.jta.runtime.CDIDelegatingTransactionManager.commit(CDIDelegatingTransactionManager.java:97)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:311)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:160)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew.doIntercept(TransactionalInterceptorRequiresNew.java:33)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:53)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew.intercept(TransactionalInterceptorRequiresNew.java:26)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew_Bean.intercept(TransactionalInterceptorRequiresNew_Bean.zig:340)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
        at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
        at org.acme.ExampleHelper_Subclass.importFirst(ExampleHelper_Subclass.zig:159)
        at org.acme.ExampleHelper_ClientProxy.importFirst(ExampleHelper_ClientProxy.zig:126)
        at org.acme.ExampleSchedulerService.processImports(ExampleSchedulerService.java:24)
        at org.acme.ExampleSchedulerService_Subclass.processImports$$superaccessor1(ExampleSchedulerService_Subclass.zig:201)
        at org.acme.ExampleSchedulerService_Subclass$$function$$1.apply(ExampleSchedulerService_Subclass$$function$$1.zig:29)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:127)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:100)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew.doIntercept(TransactionalInterceptorRequiresNew.java:35)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:53)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew.intercept(TransactionalInterceptorRequiresNew.java:26)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew_Bean.intercept(TransactionalInterceptorRequiresNew_Bean.zig:340)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
        at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
        at org.acme.ExampleSchedulerService_Subclass.processImports(ExampleSchedulerService_Subclass.zig:159)
        at org.acme.ExampleSchedulerService_Bean.create(ExampleSchedulerService_Bean.zig:212)
        at org.acme.ExampleSchedulerService_Bean.create(ExampleSchedulerService_Bean.zig:228)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
        at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
        at org.acme.ExampleSchedulerService_ClientProxy.arc$delegate(ExampleSchedulerService_ClientProxy.zig:67)
        at org.acme.ExampleSchedulerService_ClientProxy.arc_contextualInstance(ExampleSchedulerService_ClientProxy.zig:82)
        at org.acme.ExampleSchedulerService_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.notify(ExampleSchedulerService_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.zig:94)
        at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:282)
        at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:267)
        at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:69)
        at io.quarkus.arc.runtime.LifecycleEventRunner.fireStartupEvent(LifecycleEventRunner.java:23)
        at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:60)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent-858218658.deploy_0(LifecycleEventsBuildStep$startupEvent-858218658.zig:81)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent-858218658.deploy(LifecycleEventsBuildStep$startupEvent-858218658.zig:40)
        at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:500)
        at io.quarkus.runtime.Application.start(Application.java:90)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:97)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:62)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:104)
        at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.hibernate.exception.DataException: could not execute statement
        at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:115)
        at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
        at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3301)
        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3828)
        at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:107)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:604)
        at org.hibernate.engine.spi.ActionQueue.lambda$executeActions$1(ActionQueue.java:478)
        at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:475)
        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:348)
        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:40)
        at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:102)
        at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1362)
        ... 72 more
Caused by: org.h2.jdbc.JdbcSQLException: Wert zu gross / lang für Feld "NAME VARCHAR(1) NOT NULL": "'dbb7648e-0eaf-4c5c-b22d-3866bf347d0d' (36)"
Value too long for column "NAME VARCHAR(1) NOT NULL": "'dbb7648e-0eaf-4c5c-b22d-3866bf347d0d' (36)"; SQL statement:
insert into ExampleParentEntity (name, version, ID) values (?, ?, ?) [22001-197]
        at org.h2.message.DbException.getJdbcSQLException(DbException.java:357)
        at org.h2.message.DbException.get(DbException.java:179)
        at org.h2.table.Column.validateConvertUpdateSequence(Column.java:398)
        at org.h2.table.Table.validateConvertUpdateSequence(Table.java:798)
        at org.h2.command.dml.Insert.insertRows(Insert.java:177)
        at org.h2.command.dml.Insert.update(Insert.java:134)
        at org.h2.command.CommandContainer.update(CommandContainer.java:102)
        at org.h2.command.Command.executeUpdate(Command.java:261)
        at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:199)
        at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:153)
        at io.agroal.pool.wrapper.PreparedStatementWrapper.executeUpdate(PreparedStatementWrapper.java:86)
        at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
        ... 83 more

2020-12-09 13:54:50,556 ERROR [org.acm.ExampleSchedulerService] (Quarkus Main Thread) CATCH!!! Error invoking subclass method
2020-12-09 13:54:50,691 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.RuntimeException: ARJUNA016108: Wrong transaction on thread
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:305)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:164)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:100)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew.doIntercept(TransactionalInterceptorRequiresNew.java:35)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:53)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew.intercept(TransactionalInterceptorRequiresNew.java:26)
        at io.quarkus.narayana.jta.runtime.interceptor.TransactionalInterceptorRequiresNew_Bean.intercept(TransactionalInterceptorRequiresNew_Bean.zig:340)
        at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
        at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
        at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
        at org.acme.ExampleSchedulerService_Subclass.processImports(ExampleSchedulerService_Subclass.zig:159)
        at org.acme.ExampleSchedulerService_Bean.create(ExampleSchedulerService_Bean.zig:212)
        at org.acme.ExampleSchedulerService_Bean.create(ExampleSchedulerService_Bean.zig:228)
        at io.quarkus.arc.impl.AbstractSharedContext.createInstanceHandle(AbstractSharedContext.java:96)
        at io.quarkus.arc.impl.AbstractSharedContext.access$000(AbstractSharedContext.java:14)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:29)
        at io.quarkus.arc.impl.AbstractSharedContext$1.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.LazyValue.get(LazyValue.java:26)
        at io.quarkus.arc.impl.ComputingCache.computeIfAbsent(ComputingCache.java:69)
        at io.quarkus.arc.impl.AbstractSharedContext.get(AbstractSharedContext.java:26)
        at io.quarkus.arc.impl.ClientProxies.getApplicationScopedDelegate(ClientProxies.java:17)
        at org.acme.ExampleSchedulerService_ClientProxy.arc$delegate(ExampleSchedulerService_ClientProxy.zig:67)
        at org.acme.ExampleSchedulerService_ClientProxy.arc_contextualInstance(ExampleSchedulerService_ClientProxy.zig:82)
        at org.acme.ExampleSchedulerService_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.notify(ExampleSchedulerService_Observer_Synthetic_d70cd75bf32ab6598217b9a64a8473d65e248c05.zig:94)
        at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:282)
        at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:267)
        at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:69)
        at io.quarkus.arc.runtime.LifecycleEventRunner.fireStartupEvent(LifecycleEventRunner.java:23)
        at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:60)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent-858218658.deploy_0(LifecycleEventsBuildStep$startupEvent-858218658.zig:81)
        at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent-858218658.deploy(LifecycleEventsBuildStep$startupEvent-858218658.zig:40)
        at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:500)
        at io.quarkus.runtime.Application.start(Application.java:90)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:97)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:62)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:104)
        at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134)
        at java.base/java.lang.Thread.run(Thread.java:834)

2020-12-09 13:54:50,692 INFO  [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start hot replacement endpoint to recover from previous Quarkus startup failure
Quarkus application exited with code 1
Press Enter to restart or Ctrl + C to quit
2020-12-09 13:55:50,456 WARN  [com.arj.ats.arjuna] (Transaction Reaper) ARJUNA012117: TransactionReaper::check timeout for TX 0:ffff0a28f814:e8fa:5fd0c91a:0 in state  RUN
2020-12-09 13:55:50,457 WARN  [com.arj.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA012121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffff0a28f814:e8fa:5fd0c91a:0

To Reproduce

Steps to reproduce the behavior:

  1. Download the reproducer: hibernate-lazy-one-to-one.zip
  2. mvn quarkus:dev
  3. Exception from above happens
  4. Now, remove the @transactional from the ExampleSchedulerService
  5. mvn quarkus:dev
  6. Only the excpected JdbcSQLException happens, since the field is too small. No "Wrong transaction on thread" is logged.

Environment (please complete the following information):

  • Output of uname -a or ver:
    MSYS_NT-10.0 NANB7NLNVP2 2.10.0(0.325/5/3) 2018-06-13 23:34 x86_64 Msys
  • Quarkus version or git rev: 1.10.3.Final
  • Build tool (ie. output of mvnw --version or gradlew --version):
    Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    Maven home: C:\eclipse\tools\apache-maven\bin..
    Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: C:\eclipse\tools\zulu11.39.15-ca-jdk11.0.7-win_x64
    Default locale: de_DE, platform encoding: Cp1252
    OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
@Postremus Postremus added the kind/bug Something isn't working label Dec 9, 2020
@ghost ghost added the env/windows Impacts Windows machines label Dec 9, 2020
@mmusgrov
Copy link
Contributor

When a JTA transaction is started it gets associated with the calling thread (this is in the JTA spec). If you start a second transaction while that one is running and still associated then we throw a javax.transaction.NotSupportedException.

JTA transaction management is normally performed by frameworks and the usual behaviour is to suspend the original transaction before starting another one. We do support nested transactions but you have to enable them but, even then, frameworks such as EBJ and JPA do not handle nested transactions.

@Postremus
Copy link
Member Author

Postremus commented Jan 22, 2021

@mmusgrov The "Wrong transaction on thread" is already fixed by #13855. Main problem was, that in case of an exception the suspended transaction never got activated again.

Only thing really remaining is that narayana is logging the exception as warning.

2020-12-09 13:54:50,550 WARN  [com.arj.ats.arjuna] (Quarkus Main Thread) ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple< 0:ffff0a28f814:e8fa:5fd0c91a:2, org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization@5d189a63 >: javax.persi
stence.PersistenceException: org.hibernate.exception.DataException: could not execute statement

I believe that this log should at least not include the full exception, since the exception itself is rethrown and is then logged by quarkus.
Maybe it would be enough for narayana to include the getMessage() in its log?

@mmusgrov
Copy link
Contributor

I believe that this log should at least not include the full exception, since the exception itself is rethrown and is then logged by quarkus.
Maybe it would be enough for narayana to include the getMessage() in its log?

What about the alternate viewpoint that it should be the responsibility of quarkus not to re-throw the exception. Changing it in Narayana means that other systems we integrate with would not see the stacktrace. Is the quarkus code that re-throws it in the JTA extension or is it happening elsewhere, if it under quarkus's control then it ought to be done there?

@mmusgrov
Copy link
Contributor

mmusgrov commented Jan 22, 2021

Ah wait, you said that we were re-throwing it and that quarkus then logs it again. I would still argue that an alternate viewpoint is that quarkus log only the message if it thinks the full stack has already been logged. If you still think we should not log the full stack then we would need input from the various narayana jta transaction stakeholders. For that you could raise the issue on our forum https://groups.google.com/g/narayana-users, that way we can get input from a wider audience than just quarkus.

@geoand
Copy link
Contributor

geoand commented Sep 13, 2024

Is this still an issue?

@geoand geoand added the triage/needs-feedback We are waiting for feedback. label Sep 13, 2024
@geoand
Copy link
Contributor

geoand commented Sep 27, 2024

Closing for lack of feedback

@geoand geoand closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env/windows Impacts Windows machines kind/bug Something isn't working triage/needs-feedback We are waiting for feedback.
Projects
None yet
Development

No branches or pull requests

3 participants