websphereejblookupclassnotfoundexception

Getting error while doing JNDI lookup for EJB in websphere 8.5


My application is getting deployed and loggers also shows the mapping for all the EJBs. But while doing look up for EJB, it is giving error stating EJBMDOrchestr E CNTR0075E: The user-provided class "xxx.xxx.xxx.EJSRemoteStatelessxxx_a265e910" needed by the EnterpriseBean could not be found or loaded. [1/10/23 17:48:57:004 IST] 00000144 SharedEJBRunt E WSVR0068E: Attempt to start EnterpriseBean xxx#xxx.jar#xxfailed with exception: com.ibm.ejs.container.EJBConfigurationException: Bean class xxx.xxx.xxx.EJSRemoteStatelessxxx_a265e910 could not be found or loaded In above class name EJSRemoteStateless and _a265e910 is not configured in calling part.

I have added ejb-jar.xml, ibm-ejb-jar-bnd.xmi and ibm-ejb-jar-ext.xmi in META-INF


Solution

  • For WebSphere, classes that use a naming convention like EJSRemoteStatelessxxx_a265e910 are deployment artifacts. These artifacts are generated dynamically as needed for EJB 3.x applications. However, older EJB applications were required to use the EJBDeploy command. EJBDeploy may be used prior to application install or the option to run EJBDeploy during install may also be used.

    Starting with WebSphere 8.5.5.16, the use of EJBDeploy is no longer required for EJB applications that do not include EJB Entity beans.

    To avoid the CNTR0075E error, either use EJBDeploy to generate the deployment artifacts or upgrade to WebSphere 8.5.5.16 or later.

    For more information about EJBDeploy : https://www.ibm.com/docs/en/was/8.5.5?topic=reference-ejbdeploy-command

    For information about making EJBDeploy optional for EJB 2.x applications: https://www.ibm.com/support/pages/apar/PH12563