Gen Web Client calling EJB under JBoss EAP 7.1 "NoSuchEJBException" (EJBCLIENT000079)
search cancel

Gen Web Client calling EJB under JBoss EAP 7.1 "NoSuchEJBException" (EJBCLIENT000079)

book

Article ID: 124858

calendar_today

Updated On: 01-14-2025

Products

Gen Gen - Run Time Distributed

Issue/Introduction

Gen Web Generation client call to Gen EJB server procedure step SERVER1 (Server Manager SVR1) which has been deployed to JBoss EAP 7.1 in file cstest.ear receives message:

TIRM037E: Fatal Error was encountered ***
TIRM158E: A communication error was encountered on the client
[Function: EJBRMIDynamicCoopFlow.processException.EJBRMI.Exception]javax.ejb.NoSuchEJBException: EJBCLIENT000079: Unable to discover destination for request for EJB StatelessEJBLocator for "/SVR1/SERVER1", view is interface cstest.SERVER1_Remote, affinity is None
TIRM046E: Processing terminated ***



Similar message received for EJB deployment under WildFly 10.1:

TIRM037E: Fatal Error was encountered ***
TIRM158E: A communication error was encountered on the client
[Function: EJBRMIDynamicCoopFlow.processException.EJBRMI.Exception]java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:, moduleName:SVR1, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@4b94e676
TIRM046E: Processing terminated ***

Cause

The errors are due to using the standard syntax "*=EJBRMI" in the commcfg.properties file referenced by the Gen Web client.
 

Resolution

When calling an EJB under JBoss or Wildfly the EJBRMI reference for the transaction/trancode lookup must contain the ear file name i.e.
JBoss: <TRANCODE>=EJBRMI J {EARFileName} 
WildFly: <TRANCODE>=EJBRMI W {EARFileName} 

So for this example these values should be used:
JBoss: *=EJBRMI J cstest
WildFly: *=EJBRMI W cstest

NOTE: The ear file name should not contain the extension '.ear' otherwise similar errors will continue to occur.
The ear file name with no extension will match the node for the deployed EJB global reference as seen in the server.log file e.g. java:global/cstest/SVR1/SERVER1!cstest.SERVER1_Remote
java:global/cstest/SVR1/SERVER1!cstest.SERVER1_Local

Additional Information