Gen 8.6 Java Proxy sample JSP fails lookup for EJB on JBoss EAP 7.1 (EJBCLIENT000062)
search cancel

Gen 8.6 Java Proxy sample JSP fails lookup for EJB on JBoss EAP 7.1 (EJBCLIENT000062)

book

Article ID: 132813

calendar_today

Updated On:

Products

Gen Gen - Run Time Distributed

Issue/Introduction

Gen 8.6 PTFs for JBoss EAP 7.1 support installed.

Gen 8.6 EJB SVR1 for PStep Server1 is already deployed with a Gen Web Client to a JBoss EAP 7.1 instance and the client can successfully invoke the EJB.

Gen 8.6 Java Proxy sample JSP for server load module SVR1 (Svr1.ear) deployed successfully to the same JBoss instance.

The Svr1.ear lib/genrt.jar file contains commcfg.properties file which has correct transaction mapping line for locating EJB in JBoss EJB ear file cstest.ear:

*=EJBRMI J cstest

However when Java Proxy attempts to call the EJB SVR1 the lookup fails with error:

===

An exception occurred calling Server1.execute method

Exception: com.ca.gen.csu.exception.CSUException

Description: [Function: EJBRMIContext.getEjbProxyStubData]lookup("SERVER1") threw: "javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "cstest/SVR1/SERVER1!cstest.SERVER1_Remote" [Root exception is java.lang.ClassNotFoundException: cstest.SERVER1_Remote from [Module "deployment.Svr1.ear.Svr1.war" from Service Module Loader]]" root cause: "java.lang.ClassNotFoundException: cstest.SERVER1_Remote from [Module "deployment.Svr1.ear.Svr1.war" from Service Module Loader]"

Stack Trace:

com.ca.gen.csu.exception.CSUException: [Function: EJBRMIContext.getEjbProxyStubData]lookup("SERVER1") threw: "javax.naming.CommunicationException: EJBCLIENT000062: Failed to look up "cstest/SVR1/SERVER1!cstest.SERVER1_Remote" [Root exception is java.lang.ClassNotFoundException: cstest.SERVER1_Remote from [Module "deployment.Svr1.ear.Svr1.war" from Service Module Loader]]" root cause: "java.lang.ClassNotFoundException: cstest.SERVER1_Remote from [Module "deployment.Svr1.ear.Svr1.war" from Service Module Loader]"

    at com.ca.gen.odc.coopflow.ejbrmi.EJBRMIContext.getEjbProxyStubData(Unknown Source)

    at com.ca.gen.odc.coopflow.ejbrmi.EJBRMIDynamicCoopFlow.doFlow(Unknown Source)

    at com.ca.gen.odc.coopflow.ejbrmi.EJBRMIDynamicCoopFlow.doCoopFlow(Unknown Source)

    at com.ca.gen.odc.coopflow.CoopFlow.coopFlow(Unknown Source)

    at cstest.Server1.execute(Unknown Source)

    at org.apache.jsp.Server1_jsp._jspService(Server1_jsp.java:189)

...

===

JBoss server.log file contains similar error information:

===

2019-05-30 04:08:31,971 INFO [stdout] (default task-34) 05/30/19-04:08:31:971[default task-34]: EJBRMIContext.getEjbProxyStubData(): lookup("SERVER1") threw: NamingException

2019-05-30 04:08:31,972 INFO [stdout] (default task-34) 05/30/19-04:08:31:972[default task-34]: EJBRMIContext.getEjbProxyStubData(): NamingException type: javax.naming.CommunicationException

2019-05-30 04:08:31,972 INFO [stdout] (default task-34) 05/30/19-04:08:31:972[default task-34]: EJBRMIContext.getEjbProxyStubData(): NamingException resolved name: cstest/SVR1/SERVER1!cstest.SERVER1_Remote

2019-05-30 04:08:31,973 INFO [stdout] (default task-34) 05/30/19-04:08:31:973[default task-34]: EJBRMIContext.getEjbProxyStubData(): NamingException explanation EJBCLIENT000062: Failed to look up "cstest/SVR1/SERVER1!cstest.SERVER1_Remote"

2019-05-30 04:08:31,974 INFO [stdout] (default task-34) 05/30/19-04:08:31:974[default task-34]: EJBRMIContext.getEjbProxyStubData(): NamingException root cause java.lang.ClassNotFoundException: cstest.SERVER1_Remote from [Module "deployment.Svr1.ear.Svr1.war" from Service Module Loader]

2019-05-30 04:08:31,975 INFO [stdout] (default task-34) 05/30/19-04:08:31:975[default task-34]: EJBRMIContext.getEjbProxyStubData(): Exception Stack Trace:

2019-05-30 04:08:31,975 INFO [stdout] (default task-34) 05/30/19-04:08:31:975[default task-34]: java.lang.ClassNotFoundException: cstest.SERVER1_Remote from [Module "deployment.Svr1.ear.Svr1.war" from Service Module Loader]

...

===


Environment

Release : 8.6
Component : CA Gen 8.6 Java Proxy calling EJB 

Cause

Root cause was found to be that the EJB dpy jar file had not been deployed with the sample Java Proxy JSP (or not in the relevant classpath).

This requirement is documented in the Gen 8.6 documentation under Distributed Processing > Working With Enterprise JavaBeans > Construction and Deployment in EJB > Construction i.e.
 
The results of the construction process are placed in the <model-directory>\java\classes directory. The following files are created by the build of a Load Module and are found in the classes directory:

  • <load-module>.jar -- Contains the classes that implement the Server Procedure Step as a Stateless Session bean. The EJB Server for execution loads this file.
  • <Server Procedure Step>_dpy.jar -- Contains the portable interface definitions for the EJB. This file is used by the clients (Java Web Client, Java Proxy, and so on) to call the EJB.

===

Resolution

1. Using Windows Explorer go to directory containing the EJB dpy file i.e. ...\cstest.ief\java\classes (contains SERVER1_dpy.jar)

2. Start a 2nd Windows Explorer instance and go to the proxy samples directory for the sample JSP i.e. ...\cstest.ief\proxy\java\deploy\Svr1\samples\JSP

3. Using 7-zip open the sample JSP jar file Svr1.ear, open the Svr1.war file and drill down to the WEB-INF/lib directory

4. Drag the file SERVER1_dpy.jar from 1st Window Explorer session into that directory and accept the "Confirm File Copy" prompt.

5. Close the Svr1.war file and accept the prompt for it being updated/save to archive file (Svr1.ear).

After updating JBoss deployment with new Svr1.ear file the EJB look up problem is resolved.

Additional Information

Distributed Processing > Working With Proxies > Java Proxy > Executing the Sample Java Proxy Applications