JBoss 5 java.lang.NoClassDefFoundError: javax/transaction/UserTransaction

Posted on

I am migrating an application from JBoss 4 EAP to JBoss 5 EAP. I want to get to V7, but doing this a step at a time. When running a unit test on JBoss 5, I get a NoClassDefFoundError on javax.transaction.UserTransaction. This occurs during a EJBContext.getUserTransaction() call. It works fine on JBoss 4.

Any ideas on where to look? Seems like this class is part of the jboss-javaee.jar located in JBOSS_HOME\jboss-as\lib. I also copied it to JBOSS_HOME\jboss-as\server{SERVER-NAME}\lib, but that didn't help.

I also see the following:
2020-02-13 15:19:47,744 WARN [org.jboss.detailed.classloader.ClassLoaderManager] (WorkerThread#0[127.0.0.1:6744]) Unexpected error during load of:javax.transaction.UserTransaction
java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) previously initiated loading for a different type with name "javax/transaction/UserTransaction"

Any assistance is appreciated.