cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Lookup Error (SAP Resource Adapter)

Former Member
0 Kudos

Hi all,

I received a quite stange error (Below you can see the relavent part of the logfile).

While the first attempt to get the ConnectionFactory of the SAP JRA succeeds, the second one fails. As you can see, context and parameters of the lookup are exactly the same. Does anybody has experiences with this problem?

Thanks a lot

Nadine

*******************************************************

<b>1st attempt</b>

DEBUG SAPEngine_Application_Thread[impl:3]_18 com.xxx.ik.ejb.srouter.util.SystemRouterUtil - return jca

name: java:comp/env/SAPJCA

INFO SAPEngine_Application_Thread[impl:3]_18 com.xxx.ik.ejb.sap.generic.bo.SAPGenericBO - search for

JCA Adapter: java:comp/env/SAPJCA

DEBUG SAPEngine_Application_Thread[impl:3]_18 com.xxx.ik.ejb.sap.generic.bo.SAPGenericBO -

connectionfactory: com.sap.mw.jco.jra.JRA$ConnectionFactoryImpl@1d4445d

<b>2nd attempt</b>

DEBUG SAPEngine_Application_Thread[impl:3]_1 com.xxx.ik.ejb.srouter.util.SystemRouterUtil - return jca

name: java:comp/env/SAPJCA

INFO SAPEngine_Application_Thread[impl:3]_1 com.xxx.ik.ejb.sap.generic.bo.SAPGenericBO - search for JCA Adapter: java:comp/env/SAPJCA

ERROR SAPEngine_Application_Thread[impl:3]_1 com.xxx.ik.ejb.sap.generic.bo.SAPGenericBO -

com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at java:comp, the whole lookup name is java:comp/env/SAPJCA.

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Nadine,

Maybe the application of the EJB com.xxx.ik.ejb.sap.generic.bo.SAPGenericBO has been redeployed/restarted between the two attempts?

You can list the whole JNDI tree using the telnet command "lsn" from the "naming" group (>jump 0, then >add naming, then >lsn). The JNDI context of your EJB should be under

ejbContexts/<provider-name>/<application-name>/<jndi-name>

By default the <jndi-name> of an EJB is

<provider-name>/<application-name>/<ejb-name>

Hope this will be of help,

Vladimir

Former Member
0 Kudos

Hi Vladimir,

First of all, thanks a lot for your answer.

I'm sure the application was not restarted or redeployed (as only about one minute has passed between the two attempts). During the processing of our application, this resource adapter (and the class that calls it) is used two times.

I searched the JNDI tree as you recommended and found:

 * ejbContexts [Context]
    * t-systems.com [Context]
      * Integrationkernel [Context]
        * sap [Context]
          * generic [Context]
            * SAPGenericEJB [Context]
              * java:comp [Context]
                ORB
                HandleDelegate
                UserTransaction
                * env [Context]
                  SAPJCA

As I am only migrating this application, I just had a deeper look into method calls.

The application consists of a web app which calls ejbs. The EJBs in turn are just Wrapper for the so called BusinessObjects (Beans). In the first attempt the SAPGenericEJB calls the SAPGenericBO which does the lookup. In the second attempt, the SAPGenericBO is called directly from a workflow-engine. Could it be, that this causes the problem? If so, what can I do? Define the resource reference in the WF-Module too? Thanks...

Nadine

Message was edited by: Nadine Kress

Vlado
Advisor
Advisor
0 Kudos

Hi Nadine,

Yes, this exactly causes the problem. The resource SAPJCA is available in SAPGenericEJB's environment and the lookup succeeds since it is performed on behalf of that EJB. What is this workflow-engine? If it is another EJB or web module, then you have to define the resource-ref in its deployment descriptor too.

Best regards,

Vladimir

Former Member
0 Kudos

Hi Vladimir,

I think this will solve the problem... The calling element of the WorkflowEngine is not an EJB, but the Workflow is started by one, so there are Deployment Descriptors. Sorry - I was confused as both classes - calling class and called class - are not Enterprise Java Beans, but do need the references declared for the EJBs in the same module. Just because I'm interested in this topic: is this a WAS specific behaviour or is it defined by J2EE 1.3 Spec? The application did not need these refs in JBoss, but this is also not J2EE compliant ...

Thanks again, Nadine.

Vlado
Advisor
Advisor
0 Kudos

Hi Nadine,

It doesn't matter if the EJB does the lookup itself or delegates the call to some helper class which performs the lookup - then it's actually performed on behalf of the EJB. This is the J2EE standard behavior.

Best regards,

Vladimir

Answers (0)