ClassNotFoundException raised by PeriodicRecovery thread for resource adapter in EAP 6
Issue
- A custom resource adapter contains multiple JAR files deployed in a single module
- A JNDI bound resource is accessed from a resource adapter when periodic recovery calls
getXAResources() - The bound resource is of a class which is not in the same JAR as the resource adapter implementation class
- A
ClassNotFoundExceptionis raised and recovery fails
... java.lang.ClassNotFoundException: my.jndi.bound.CtxFactory from [Module "org.jboss.jts:main" from local module loader ...]
at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:124)
...
at javax.naming.InitialContext.<init>(InitialContext.java:216)
...
at my.custom.ra.MyRA.getXAResources(MyRA.java:99)
at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryInflowImpl.getXAResources(XAResourceRecoveryInflowImpl.java:96)
...
at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:371)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.