Unable to commit custom APM when using JBoss Application Server

Document ID : KB000087386
Last Modified Date : 14/04/2018
Show Technical Document Details
Issue:
Affects Release version(s): 3

Error Message :
Unable to find transaction: java:comp/UserTransaction

The Automic Package Manager (APM) crashes with the below exception when using a JBoss Application Server and Request Management (RM) version 3.1.3 HF1.

Using an APM command with the same RM version and Tomcat runs successfully.

 
08:56:58,706 ERROR [com.levatis.apm.LRM.CreateNewRequest] (apm-sandbox-1) java.lang.reflect.InvocationTargetException: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException 
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:142) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:66) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122) [knowledge-api-5.5.0.Final.jar:5.5.0.Final] 
at com.levatis.uc4.toolbox.manager.jbpm.SessionAndClient.inizialize(SessionAndClient.java:116) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at com.levatis.uc4.toolbox.manager.jbpm.SessionAndClient.getInstance(SessionAndClient.java:66) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at com.levatis.uc4.toolbox.manager.jbpm.ProcessManager.startNewProcess(ProcessManager.java:1564) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at com.levatis.apm.LRM.CreateNewRequest.execute(CreateNewRequest.java:223) 
at com.levatis.apm.LRM.CreateNewRequest.execute(CreateNewRequest.java:1) 
at com.levatis.apm.APMCallableCommand.execute(APMCallableCommand.java:27) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at com.levatis.apm.APMTransactionUtil.wrapInTransaction(APMTransactionUtil.java:46) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at com.levatis.apm.APMCallableCommand.call(APMCallableCommand.java:32) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at com.levatis.apm.APMCallableCommand.call(APMCallableCommand.java:9) [jrm-server-lib-3.1.3+hf.1-FINAL.jar:3.1.3+hf.1-FINAL] 
at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.8.0_92] 
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_92] 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_92] 
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_92] 
Caused by: java.lang.reflect.InvocationTargetException 
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_92] 
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_92] 
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [rt.jar:1.8.0_92] 
at java.lang.reflect.Constructor.newInstance(Unknown Source) [rt.jar:1.8.0_92] 
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:128) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
... 15 more 
Caused by: java.lang.IllegalStateException: Unable to find transaction: java:comp/UserTransaction 
at org.drools.persistence.jta.JtaTransactionManager.findUserTransaction(JtaTransactionManager.java:124) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
at org.drools.persistence.jta.JtaTransactionManager.<init>(JtaTransactionManager.java:69) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
at org.drools.persistence.SingleSessionCommandService.initTransactionManager(SingleSessionCommandService.java:303) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:117) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
... 20 more 
Caused by: javax.naming.NameNotFoundException: java:comp/UserTransaction 
at org.jboss.as.naming.InitialContext$DefaultInitialContext.findContext(InitialContext.java:197) 
at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:241) 
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183) 
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179) 
at javax.naming.InitialContext.lookup(Unknown Source) [rt.jar:1.8.0_92] 
at javax.naming.InitialContext.lookup(Unknown Source) [rt.jar:1.8.0_92] 
at org.drools.persistence.jta.JtaTransactionManager.findUserTransaction(JtaTransactionManager.java:119) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final] 
Environment:
OS Version: N/A
Cause:
Cause type:
Defect
Root Cause: When using a JBoss Application Server unable to commit a new Request using a custom APM.
Resolution:
Update to a fix version listed below or a newer version if available.

Fix Status: Released

Fix Version(s):
Request.Management 3.2.1 - Available
Request.Management 3.1.3 HF3 - Available
Additional Information:
Workaround :
Instead of JBOSS, use Tomcat as a Web server.