CA Gen 8.6 Web Client encounters "java.lang.NoClassDefFoundError: javax/jms/Message" on execute (JBWEB004038) or deployment (MSC000001) with JBoss EAP 7.1 and WildFly 10.1

Document ID : KB000124389
Last Modified Date : 14/01/2019
Show Technical Document Details
Issue:
Testing Gen 8.6 with newly supported JBoss EAP 7.1 or WildFly 10.1 (relevant PTFs installed), a Web Generation client fails to load with exception:
===
Error processing request 
Context Path:/jptest86 
Servlet Path:/WIN2ServletManager 
Path Info:null 
Query String:null 
Stack Trace: 
org.apache.jasper.JasperException: JBWEB004038: An exception occurred processing JSP page /win2.jsp at line 11 

11 

8: request.setAttribute("charSet","UTF-8"); 
9: request.setAttribute("referer", request.getRequestURI()); 
10: %> 
11: <jsp:forward page="WIN2ServletManager" /> 


Stacktrace: 
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568) 
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:456) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) 
... 

Caused by: javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/jms/Message 
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:889) 
... 
Caused by: java.lang.NoClassDefFoundError: javax/jms/Message 
at com.ca.gen.smrt.ServletApplication.<clinit>(Unknown Source) 
at com.ca.gen.smrt.ServletManager.init(Unknown Source) 
... 
Caused by: java.lang.ClassNotFoundException: javax.jms.Message from [Module "deployment.jptest86.ear.genrt.jar" from Service Module Loader] 
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) 
===


A similar problem can occur during deployment if the Assemble "Web Gen Client" tab option "Load JSP/Servlets at startup" is enabled
===
2019-01-14 05:13:52,048 INFO  [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-3) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.8.Final-redhat-1
2019-01-14 05:13:52,480 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 62) WFLYCLINF0002: Started client-mappings cache from ejb container
2019-01-14 05:13:52,762 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 69) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./jptest86: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./jptest86: java.lang.NoClassDefFoundError: javax/jms/Message
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
...
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.lang.NoClassDefFoundError: javax/jms/Message
    at com.ca.gen.smrt.ServletApplication.<clinit>(Unknown Source)
    at com.ca.gen.smrt.ServletManager.init(Unknown Source)
    at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
...
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
    ... 6 more
Caused by: java.lang.ClassNotFoundException: javax.jms.Message from [Module "deployment.jptest86.ear.genrt.jar" from Service Module Loader]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
    ... 25 more

2019-01-14 05:13:52,762 ERROR [org.jboss.as.controller.management-operation] (External Management Request Threads -- 6) WFLYCTL0013: Operation ("add") failed - address: ([("deployment" => "jptest86.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./jptest86" => "java.lang.NoClassDefFoundError: javax/jms/Message
    Caused by: java.lang.NoClassDefFoundError: javax/jms/Message
    Caused by: java.lang.ClassNotFoundException: javax.jms.Message from [Module \"deployment.jptest86.ear.genrt.jar\" from Service Module Loader]"}}
2019-01-14 05:13:52,762 ERROR [org.jboss.as.server] (External Management Request Threads -- 6) WFLYSRV0021: Deploy of deployment "jptest86.ear" was rolled back with the following failure message: 
{"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./jptest86" => "java.lang.NoClassDefFoundError: javax/jms/Message
    Caused by: java.lang.NoClassDefFoundError: javax/jms/Message
    Caused by: java.lang.ClassNotFoundException: javax.jms.Message from [Module \"deployment.jptest86.ear.genrt.jar\" from Service Module Loader]"}}
2019-01-14 05:13:52,882 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0208: Stopped subdeployment (runtime-name: jptest86.war) in 135ms
2019-01-14 05:13:52,892 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0028: Stopped deployment jptest86.ear (runtime-name: jptest86.ear) in 149ms
===
Cause:
It appears that JBoss EAP 7.1 and WildFly 10.1 are not loading required Java jms classes. The problem occurred when starting the Application Server using configuration file standalone.xml.
 
Resolution:
After switching to using the configuration file standalone-full.xml the problem did not occur. The standalone-full.xml provides the jms support e.g.
"Messaging configuration - WildFly 10 - Project Documentation Editor":https://docs.jboss.org/author/display/WFLY10/Messaging+configuration

The standalone-full.xml is also what Gen Engineering team have tested WildFly with which would also apply to JBoss:
https://docops.ca.com/ca-gen/8-6/en/developing/working-with-build-tool/ear-file-assembling#EARFileAssembling-WFCWildFlyConsiderations
"Note: Testing for WildFly has been done using the standalone-full profile."