Gen web client/EJB server EJBRMI syntax errors causing Liberty exceptions
search cancel

Gen web client/EJB server EJBRMI syntax errors causing Liberty exceptions

book

Article ID: 385899

calendar_today

Updated On:

Products

Gen Gen - Run Time Distributed

Issue/Introduction

This article relates to using Gen Web client/EJB server applications under Liberty Application Server.
It describes the various exceptions/errors javax.naming.NameNotFoundException, javax.naming.NoInitialContextException, "Using an invalid or unsupported application server" that may occur if the correct syntax is not used in the commcfg.properties file that is assembled into the Gen Java runtimes file genrt.jar:

1. The ear file name is incorrect e.g. cstest1.ear is used instead of cstest1 and this commcfg.properties entry is used:
*=EJBRMI Y cstest1.ear

Error received when client calls server:
TIRM030E: Application failed - Updates have been backed out
TIRM031E: Failing procedure exit data follows:
TIRM032E: Last or current action block id = 0022020097
TIRM033E: Last or current action block name = CLT1
TIRM034E: Last or current database statement = 0
TIRM035E: Current statement being processed = 0000000003
TIRM037E: Fatal Error was encountered ***
TIRM158E: A communication error was encountered on the client
"SVR1") threw: "javax.naming.NameNotFoundException: javax.naming.NameNotFoundException: java:global/cstest1.ear/S1/SVR1!cstest1.SVR1_Remote" root cause: "unknown root cause"
TIRM046E: Processing terminated ***
TIRM044E: Press OK to continue ***


2. The ear file name is missing and this commcfg.properties entry is used:
*=EJBRMI Y

Error received when client calls server:
TIRM030E: Application failed - Updates have been backed out
TIRM031E: Failing procedure exit data follows:
TIRM032E: Last or current action block id = 0022020097
TIRM033E: Last or current action block name = CLT1
TIRM034E: Last or current database statement = 0
TIRM035E: Current statement being processed = 0000000003
TIRM037E: Fatal Error was encountered ***
TIRM158E: A communication error was encountered on the client
[Function: EJBRMIDynamicCoopFlow.doFlow]caught: com.ca.gen.csu.exception.CSUException: [Function: EJBRMIContext.getInstance]new InitialContext("Y","") threw: "javax.naming.NoInitialContextException: Unable to find the InitialContextFactory Y." root cause: "unknown root cause"
TIRM046E: Processing terminated ***
TIRM044E: Press OK to continue ***


3. The AppServer flag and ear file name are both missing and this commcfg.properties entry is used:
*=EJBRMI

Error received when client calls server:
TIRM030E: Application failed - Updates have been backed out
TIRM031E: Failing procedure exit data follows:
TIRM032E: Last or current action block id = 0022020097
TIRM033E: Last or current action block name = CLT1
TIRM034E: Last or current database statement = 0
TIRM035E: Current statement being processed = 0000000003
TIRM037E: Fatal Error was encountered ***
TIRM158E: A communication error was encountered on the client
[Function: com.ca.gen.odc.coopflow.ejbrmi.EJBRMIContext.createEjbProxyStubData]EJBRMIContext.createEjbProxyStubData Using an invalid or unsupported application server
TIRM046E: Processing terminated ***
TIRM044E: Press OK to continue ***

Environment

Gen 8.6 Web generation client calling EJB/EJB Web Services using EJBRMI under Liberty Application Server,.

Resolution

The correct EJBRMI syntax should be followed per commcfg.properties file comments:

#        For Liberty, when client and server are assembled in the same EAR, the format is:
#           <TRANCODE>=EJBRMI Y {EARFileName}
#                             Y                     : Flag for connecting to Liberty
#                             EARFileName           : Name of the server ear File