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 outTIRM031E: Failing procedure exit data follows:TIRM032E: Last or current action block id = 0022020097TIRM033E: Last or current action block name = CLT1TIRM034E: Last or current database statement = 0TIRM035E: Current statement being processed = 0000000003TIRM037E: 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 outTIRM031E: Failing procedure exit data follows:TIRM032E: Last or current action block id = 0022020097TIRM033E: Last or current action block name = CLT1TIRM034E: Last or current database statement = 0TIRM035E: Current statement being processed = 0000000003TIRM037E: 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 outTIRM031E: Failing procedure exit data follows:TIRM032E: Last or current action block id = 0022020097TIRM033E: Last or current action block name = CLT1TIRM034E: Last or current database statement = 0TIRM035E: Current statement being processed = 0000000003TIRM037E: 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 serverTIRM046E: Processing terminated ***TIRM044E: Press OK to continue ***
Gen 8.6 Web generation client calling EJB/EJB Web Services using EJBRMI under Liberty Application Server,.
The correct EJBRMI syntax should be followed per commcfg.properties file comments (updated by Liberty Support Phase 2 PTFs: Gen 8.6 Solutions & Patches)# 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. File name is case sensitive. Must match ear file name used# at assembly time# For Liberty, when client and server are assembled in separate EARs and deployed in different/same Liberty instances, the format is:# <TRANCODE>=EJBRMI Y <Name Manager URL> <EARFileName># Y : Flag for connecting to Liberty# Name Manager URL : <hostname>:<IIOP port># For example: hostname.company.net:2809# EARFileName : Name of the server ear File. File name is case sensitive. Must match ear file name used# at assembly time# NOTE:# Please note Liberty does not make use of an Initial Context Factory class.