When trying to use the MAPDEMO, (EJB-Example in the demos), with Jboss to run as Application Server, the following error may appear: java.rmi.ServerException: EJBException:; nested exception is: javax.ejb.EJBException: setSessionContext threw NamingException: ; CausedByException is: CCIMFCobol_v1.0 not bound All mfcobol*.rar files from the base/bin are copied in the Deploy-Directory and a MFCobol_v1.0-ds.xml file with the following contents : <?xml version="1.0" encoding="UTF-8"?> <connection-factories> <tx-connection-factory> <jndi-name>eis/MFCobol_v1.0</jndi-name> <adapter-display-name>CCIMFCobol_v1.0</adapter-display-name> </tx-connection-factory> </connection-factories>
Problem:
When trying to use the MAPDEMO, (EJB-Example in the demos), with Jboss to run as Application Server, the following error may appear:
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: setSessionContext threw NamingException: ; CausedByException is:
CCIMFCobol_v1.0 not bound
All mfcobol*.rar files from the base/bin are copied in the Deploy-Directory and a MFCobol_v1.0-ds.xml file with the following contents :
<?xml version="1.0" encoding="UTF-8"?>
<connection-factories>
<tx-connection-factory>
<jndi-name>eis/MFCobol_v1.0</jndi-name>
<adapter-display-name>CCIMFCobol_v1.0</adapter-display-name>
</tx-connection-factory>
</connection-factories>
Resolution:
1: in the ra.xml in the Cobol resource Adapter mfcobol-notx.rar, there stood the line:
<display-name xml:lang="de">mfcobol-notx</display-name>
And it should have been:
<display-name xml:lang="de">CCIMFCobol_v1.0</display-name>
2: in the from Microfocus generated EJB, it is looking for the display-name in the Function setSessionContext
ic.lookup("java:comp/env/CCIMFCobol_v1.0"); :
However it should look for the jndi-name, thus it should say:
ic.lookup("java:/eis/MFCobol_v1.0");