NullPointerException in com.sun.jts.CosTransactions.RecoveryManager when restoring EJB timers

29 views
Skip to first unread message

Christoph John

unread,
Sep 12, 2021, 9:21:46 AM9/12/21
to Payara Forum

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:
https://github.com/payara/Payara/blob/8761aec9e026e40214b53e70fae7f9a862a7a2b3/appserver/transaction/jts/src/main/java/com/sun/jts/CosTransactions/RecoveryManager.java#L1465

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.

Christoph John

unread,
Sep 12, 2021, 9:24:55 AM9/12/21
to Payara Forum
Tried to format the log output better...
Reply all
Reply to author
Forward
0 new messages