Gen Java Proxy calling EJB (EJBRMI & WebSphere) gives "improper mapping of EJBReferences"
search cancel

Gen Java Proxy calling EJB (EJBRMI & WebSphere) gives "improper mapping of EJBReferences"

book

Article ID: 194411

calendar_today

Updated On:

Products

Gen Gen - Run Time Distributed

Issue/Introduction

Gen 8.6 Java Proxy and Gen EJB have both been deployed under the same WebSphere Application Server instance.

When the Proxy attempts to execute the EJB Server Procedure Step (Svr1) an exception occurs:
===
Svr1
An exception occurred calling Svr1.execute method
Exception: com.ca.gen.csu.exception.CSUException

Description: [Function: EJBRMIBeanInstance.doFlow]Class Cast Exception attempting to call public abstract cstest1.Svr1Export cstest1.SVR1_Remote.Svr1call(cstest1.Svr1Import) throws java.lang.Exception with import view null. This exception is probably caused by improper mapping of EJBReferences.

Stack Trace:
com.ca.gen.csu.exception.CSUException:  [Function: EJBRMIBeanInstance.doFlow]Class Cast Exception attempting to call public abstract cstest1.Svr1Export cstest1.SVR1_Remote.Svr1call(cstest1.Svr1Import) throws java.lang.Exception with import view null. This exception is probably caused by improper mapping of EJBReferences.

    at com.ca.gen.odc.coopflow.ejbrmi.EJBRMIBeanInstance.doFlow(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 cstest1.Svr1.execute(Unknown Source)

    at com.ibm._jsp._Svr1._jspService(_Svr1.java:180)
...
===

Seen screenshots below:



Using the Execute button results in this exception:

Environment

Release : 8.6
Component : CA Gen Run Time, Proxies

Cause

When executing a Gen Java Proxy calling a Gen EJB Server, the EJB file "<Server Procedure Step>_dpy.jar" needs to be deployed with the Java Proxy for successful execution.
This is documented on the Gen 8.6 techdocs page: CA GEN 8.6 > Distributed Processing > Working With Enterprise JavaBeans > Construction and Deployment in EJB - see section "Construction":

Resolution

The "<Server Procedure Step>_dpy.jar" is created during the EJB build step and is found in directory "model.ief\java\classes"
For this example with Server Procedure Step name Svr1, the file Svr1_dpy.jar needs to be added to file Svr1.war which is contained within the Svr1.ear being deployed from the Proxy sample JSP directory "model.ief\proxy\java\deploy\Svr1\samples\JSP".
Svr1_dpy.jar should be added to folder WEB-INF/lib inside Svr1.war and the updated war and ear files saved.
A utility like 7-Zip can be used to achieve the above:

 

After redeploying the updated Proxy Svr1.ear file to WebSphere the execution problem is resolved: