Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

JNDI NameNotFoundException in java proxy

Hello All,

We are using a.jsp file that uses client proxy to send data to XI. We have crated the required .ear and have deployed it to the J2EE server.

The ejb-j2ee-engine.xml contains the following

<ejb-j2ee-engine>

<enterprise-beans>

<enterprise-bean>

<ejb-name>JavaProxyTest</ejb-name>

<ejb-ref>

<ejb-ref-name>ejb/JavaProxyTest</ejb-ref-name>

<jndi-name>ejb/JavaProxyTest</jndi-name>

</ejb-ref>

<session-props/>

</enterprise-bean>

</enterprise-beans>

</ejb-j2ee-engine>

The java class that invokes the proxy bean has follwoing lines of code......

Context ctx = null;

Object ref = null;

Properties p = new Properties();

p.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");

p.put(Context.PROVIDER_URL, "zhmscad5:50000");

p.put(Context.SECURITY_PRINCIPAL, "qqsaraa");

p.put(Context.SECURITY_CREDENTIALS, "patni123");

System.out.println("1.0 -


JavaProxy_BSER cONTEXT cREATED");

ctx = new InitialContext(p);

System.out.println("1.1 -


JavaProxy_BSER cONTEXT cREATED");

queryOutLocalHome =(USERNAMESYNCABSMI_PortTypeLocalHome)ctx.lookup("/localejbs/sap.com/JavaProxyTest");

.

.

.

When we are trying to send the data through .jsp file we are getting the following error:

Error:

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/ejb/JavaProxyTest

I am unable to figure out what should be JNDI name and how to use it in the java file

queryOutLocalHome =(USERNAMESYNCABSMI_PortTypeLocalHome)ctx.lookup("/localejbs/sap.com/JavaProxyTest");

Any help on the above issue will be appriciated.

Thanks

Abinash

Former Member
Not what you were looking for? View more on this topic or Ask a question