Hi,
we came across this issue with Payara 5.2020.4 and I just wanted to check if my understanding is correct.
One of our instances threw the following exception during startup:
[2021-09-09 06:03:54,145] [INFO ] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [Thread-21] [#1] ejb.timer_service_started [2021-09-09 06:03:54,145] [INFO ] [javax.enterprise.system.container.ejb.com.sun.ejb.containers] [Thread-21] [#1] ==> Restoring Timers ...
[2021-09-09 06:03:54,280] [INFO ] [org.eclipse.persistence.session./file:/home/xxx/applications/ejb-timer-service-app/WEB-INF/classes/___EJB__Timer__App] [Thread-21] [#1] EclipseLink, version: Eclipse Persistence Services - 2.7.6.payara-p1
[2021-09-09 06:04:01,096] [WARN ] [javax.enterprise.system.core.transaction.com.sun.jts.CosTransactions] [Thread-21] [#1] jts.unexpected_error_in_begin java.lang.NullPointerException at com.sun.jts.CosTransactions.RecoveryManager.waitForResync(RecoveryManager.java:1465)
at com.sun.jts.CosTransactions.TransactionFactoryImpl.localCreate(TransactionFactoryImpl.java:180)
at com.sun.jts.CosTransactions.CurrentImpl.begin(CurrentImpl.java:428)
at com.sun.jts.jta.TransactionManagerImpl.begin(TransactionManagerImpl.java:296)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.beginJTS(JavaEETransactionManagerJTSDelegate.java:496)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.startJTSTx(JavaEETransactionManagerJTSDelegate.java:397)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.startJTSTx(JavaEETransactionManagerSimplified.java:491)
at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.enlistLAOResource(JavaEETransactionManagerJTSDelegate.java:316)
at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.enlistResource(JavaEETransactionManagerSimplified.java:414)
at com.sun.enterprise.resource.rm.SystemResourceManagerImpl.enlistResource(SystemResourceManagerImpl.java:103)
If I am not mistaken, the underlying source code should be this:
The field which is checked for NULL is static volatile but AFAIK this does not prevent other threads from NULLing the field concurrently after it has been checked, for example here:
Is someone able to confirm this? This issue occurred only once up to now.
Many thanks in advance and best regards,
Chris.