What can cause the error: Exception: com.ca.gen76.csu.exception.CSUException - With the JNDI lookup of EJB from Java proxies?

Document ID : KB000054135
Last Modified Date : 14/02/2018
Show Technical Document Details


When Installing Generated Java proxy in IBM Websphere , have problem to find JNDI lookup of EJB

An exception occurred calling Myserver.execute method

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

Description: [Function: EJBRMIDynamicCoopFlow.getHomeInterface]lookup("MYSERVER") threw: "javax.naming.NameNotFoundException: Context: basmu01cNode01Cell/nodes/basmu01cNode01/servers/server1, name: MYSERVER: First component in name MYSERVER not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]" root cause: "org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0"


The problem is that when an EJB ear file is deployed, IBM WebSphere is building it's own EJB stub files. The Gen Proxy will need to use these WebSphere stub files instead of the Gen-generated _dpy files.
To get the Application to work, just add the location of the WebSphere-deployed EJB jar files to the Proxy's CLASSPATH. To get the JSP
sample to work, Add a Shared Library definition in WebSphere which also pointed to this location. Then in the Proxy application on WebSphere, you need to tell it to use this Shared Library and restart WebSphere to get this change to be picked up.

So the steps to get the Proxy JSP sample working are following:

  1. Deploy the EJB ear file on WebSphere.

  2. Find the location where WebSphere deployed the individual EJB jar files contained within the application's ear file. The location
    should be similar to:

    Figure 1

  3. Create a Shared Library in WebSphere, adding in any necessary EJB jar files from Step 2.

    Figure 2

    Figure 3

  4. Deploy the Proxy JSP sample ear file.

  5. Update the Proxy JSP sample application within WebSphere to use the Shared Library created in Step 3.

    Figure 4

    Figure 5

  6. Restart WebSphere.

  7. Run the Proxy JSP sample and it should work!