on 10-21-2005 8:07 AM
Hi,
I have created a DataSource with the below given details.
Application Name: CMAP
Name: MLJNDI
and I am trying to lookup for the same thing from a java client by getting the intialContext . In my java program the code looklike
ctxt.lookup("MLJNDI");
can anybody tell me the solution and why I am facing this problem.
Ashok
The exception is
Exception in thread "main" com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CMAP:MLJNDI.
at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:646)
at com.sap.engine.services.jndi.implserver.ServerContextRedirectableImpl.lookup(ServerContextRedirectableImpl.java:80)
at com.sap.engine.services.jndi.implserver.ServerContextImplp4_Skel.dispatch(ServerContextImplp4_Skel.java:555)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:291)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
-
predecessor system -
com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of CMAP:MLJNDI.
at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:646)
at com.sap.engine.services.jndi.implserver.ServerContextRedirectableImpl.lookup(ServerContextRedirectableImpl.java:80)
at com.sap.engine.services.jndi.implserver.ServerContextImplp4_Skel.dispatch(ServerContextImplp4_Skel.java:555)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:291)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
Ashok,
Try this:
ctx.lookup("java:comp/env/MLJNDI");
If your program is in an EJB project, you have to do additional configuration in the ejb-jar.xml file.
<b>EJB project -> ejb-jar.xml -> session beans -> resource-ref</b>
Add a new entry in resource-ref for MLJNDI such as the following:-
Resource Reference Name: <b>MLJNDI</b>
Resource Type: <b>javax.sql.DataSource</b>
Resource Authentication: <b>Container</b>
Resource Sharing Scope: <b>Shareable</b>
Hope it helps,
Teecheu Loh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ashok,
Just to add, I'm not sure if you have access to the servers J2EE Visual Admin. If you do, open up the server --> services and click on JNDI Registry.
You should walk through this just to get a feel on how SAP sets up there naming registry. It is diffinetly not the same as weblogic or tomcat.
Nathan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try:
ctxt.lookup("jdbc/MLJNDI");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.