<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: JNDI InitialContext Error in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281559#M1653333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid I'm lost now. This exception is thrown during new InitialContext(). However, in your previous post you say that you get&lt;/P&gt;&lt;P&gt;&amp;gt; The value is: Context:javax.naming.InitialContext@cdfc9c&lt;/P&gt;&lt;P&gt;but you have a problem with the EJB lookup. So, which one is true? What is the complete stack trace?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Aug 2008 08:39:25 GMT</pubDate>
    <dc:creator>Vlado</dc:creator>
    <dc:date>2008-08-11T08:39:25Z</dc:date>
    <item>
      <title>JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaq-p/4281552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a little problem with my Java programm:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Test remote = null;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			try {*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//			   Create a new intial context, which loads from jndi.properties file.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;*			*&lt;/P&gt;&lt;P&gt;*			Context ctx = new InitialContext();*&lt;/P&gt;&lt;P&gt;*			System.out.println("Context:" + ctx);*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//			   Look up the home interface using the JNDI name.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//			   This JNDI lookup returns a reference to an EJBHome instance.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			TestHome home = (TestHome) ctx.lookup("sap.com/TestWorldEar/TestBean");*&lt;/P&gt;&lt;P&gt;*			System.out.println("TestHome:" + home);*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//			   Create a session object.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			remote = home.create();*&lt;/P&gt;&lt;P&gt;*			System.out.println("Remote:" + remote);*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//			   Invoke the remote EJB methods, test and debug.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			System.out.println("Result:" + remote.getWert());*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			}  catch  (Exception e) {*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			System.out.println("Exception: " + e.getLocalizedMessage());*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*			}*&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always get the following error and I don't know how to solve the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope anybody of you can help me solving this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additional information:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Java program is running on a XI (Netweaver 7.0).&lt;/P&gt;&lt;P&gt;I want to get information from a deployed EJB. The Bean still works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answers in advance!!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings, Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Aug 2008 14:49:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaq-p/4281552</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-07T14:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281553#M1653327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For accessing the EJBs with a Java Client you can refer to the following [link.|http://help.sap.com/saphelp_nwce10/helpdata/en/45/e692b2cfaa5591e10000000a1553f7/frameset.htm]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Though the link is for the CE Version, you can use the information to set up your Initial Context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alka.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 04:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281553#M1653327</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T04:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281554#M1653328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alka,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the link. I still know that link but it doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still have problems to register to the JNDI. And I have also read that I will not need these parameters if my application is running on the same instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings, Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 07:17:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281554#M1653328</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T07:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281555#M1653329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure that your client app is running on the same server instance as the EJB? You don't pass any properties to the new InitialContext(), neither can I get where you expect the jndi.properties file to be loaded from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;\-- Vladimir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Moving to the AS Java forum since this question is about NetWeaver 7.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Vladimir Pavlov on Aug 8, 2008 4:03 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 12:59:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281555#M1653329</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2008-08-08T12:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281556#M1653330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vladimir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;yes I am sure the client app is runing on the same server as the ejb. I have deployed both within the same package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also get a value at this point:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Context ctx = new InitialContext();*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;System.out.println("Context:" + ctx);*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The value is: Context:javax.naming.InitialContext@cdfc9c&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem first starts here:&lt;/P&gt;&lt;P&gt;// Look up the home interface using the JNDI name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// This JNDI lookup returns a reference to an EJBHome instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;TestHome home = (TestHome) ctx.lookup("sap.com/TestWorldEar/TestBean");*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    &lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;System.out.println("TestHome:" + home);*&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I do not have the right path to the Bean but I don't know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings, Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 13:15:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281556#M1653330</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-08T13:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281557#M1653331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, so you pass through the new InitialContext. Do you get now a NameNotFoundException or what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, this [article|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/0736159e-0301-0010-9ea4-c63d83d0797b] might be helpful. You can also use the JNDI browser in the Visual Admin tool to locate your EJB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Vladimir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Aug 2008 16:48:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281557#M1653331</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2008-08-08T16:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281558#M1653332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vladimir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for the Link. I still got this Exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Exception: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings, Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2008 08:22:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281558#M1653332</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-11T08:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281559#M1653333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm afraid I'm lost now. This exception is thrown during new InitialContext(). However, in your previous post you say that you get&lt;/P&gt;&lt;P&gt;&amp;gt; The value is: Context:javax.naming.InitialContext@cdfc9c&lt;/P&gt;&lt;P&gt;but you have a problem with the EJB lookup. So, which one is true? What is the complete stack trace?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2008 08:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281559#M1653333</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2008-08-11T08:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281560#M1653334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this Exception is thrown after this result: Context:javax.naming.InitialContext@cdfc9c and before the lookup.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The complete Stack Trace is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception thrown [Mon Aug 11 10:48:10,187]:Exception thrown by application running in JCo Server&lt;/P&gt;&lt;P&gt;com.sap.engine.services.rfcengine.RFCException: Bean ZEJB_TEST_ZUGRIFF not found &lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:123)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.rfcengine.RFCJCOServer.handleRequest(RFCJCOServer.java:156)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.JCO$Server.dispatchRequest(JCO.java:7701)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.MiddlewareJRfc$Server.dispatchRequest(MiddlewareJRfc.java:2376)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.MiddlewareJRfc$Server.listen(MiddlewareJRfc.java:1700)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.JCO$Server.listen(JCO.java:8061)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.JCO$Server.work(JCO.java:8181)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.JCO$Server.loop(JCO.java:8128)&lt;/P&gt;&lt;P&gt;	at com.sap.mw.jco.JCO$Server.run(JCO.java:8044)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)&lt;/P&gt;&lt;P&gt;	at java.security.AccessController.doPrivileged(Native Method)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)&lt;/P&gt;&lt;P&gt;Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of ZEJB_TEST_ZUGRIFF.&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:649)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:344)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:639)&lt;/P&gt;&lt;P&gt;	at javax.naming.InitialContext.lookup(InitialContext.java:347)&lt;/P&gt;&lt;P&gt;	at javax.naming.InitialContext.lookup(InitialContext.java:347)&lt;/P&gt;&lt;P&gt;	at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:115)&lt;/P&gt;&lt;P&gt;	... 12 more&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2008 09:04:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281560#M1653334</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-11T09:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281561#M1653335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is not the exception from your lookup. This is an exception from the RFC Provider service failing to look up an EJB named ZEJB_TEST_ZUGRIFF in response to a RFC call from the ABAP system. Please clarify your scenario and outcome, because so far you've stated the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Exception during new InitialContext (no initial context factory specified).&lt;/P&gt;&lt;P&gt;2) InitialContext obtained, but exception during lookup of "sap.com/TestWorldEar/TestBean".&lt;/P&gt;&lt;P&gt;3) Goto 1.&lt;/P&gt;&lt;P&gt;4) InitialContext obtained, some other lookup exception.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2008 19:06:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281561#M1653335</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2008-08-11T19:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281562#M1653336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vladimir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my scenario is that I want to transfer data from Java Stack to Abap Stack via RFC connection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Therefore I first establish via JCO an RFC connection. Then I send an request from Abap which is handled within my Java program. In this program I also establish a connection to the EJB to get the data from the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Within my Netweaver Developer Studio everything works fine. I can send data from Java to Abap. But when I deploy my client application to the J2EE Server I have the problems as described before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings, Alexander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 07:19:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281562#M1653336</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-12T07:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281563#M1653337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;java.util.Hashtable env = new java.util.Hashtable();&lt;/P&gt;&lt;P&gt;javax.naming.Context initialContext;&lt;/P&gt;&lt;P&gt;env.put(Context.INITIAL_CONTEXT_FACTORY,&lt;/P&gt;&lt;P&gt;"com.ibm.websphere.naming.WsnInitialContextFactory");&lt;/P&gt;&lt;P&gt;env.put(Context.PROVIDER_URL,&lt;/P&gt;&lt;P&gt;"corbaloc:iiop:localhost:2809");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;initialContext = new javax.naming.InitialContext(env);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try to use the above sample code.&lt;/P&gt;&lt;P&gt;InitialContext can be created by passing environment properties via a hashtable object.&lt;/P&gt;&lt;P&gt;Check out for the values of the Context.INITIAL_CONTEXT_FACTORY,Context.PROVIDER_URL related to EP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rama Murthy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 07:34:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281563#M1653337</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-08-12T07:34:44Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281564#M1653338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you get the result&lt;/P&gt;&lt;P&gt;&amp;gt; Context:javax.naming.InitialContext@cdfc9c&lt;/P&gt;&lt;P&gt;and have also said&lt;/P&gt;&lt;P&gt;&amp;gt; My problem first starts here:&lt;/P&gt;&lt;P&gt;&amp;gt; // Look up the home interface using the JNDI name.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; // This JNDI lookup returns a reference to an EJBHome instance.&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; TestHome home = (TestHome) ctx.lookup("sap.com/TestWorldEar/TestBean");&lt;/P&gt;&lt;P&gt;&amp;gt; System.out.println("TestHome:" + home);&lt;/P&gt;&lt;P&gt;&amp;gt; &lt;/P&gt;&lt;P&gt;&amp;gt; I think I do not have the right path to the Bean but I don't know.&lt;/P&gt;&lt;P&gt;I assume that you have overcome the new InitialContext issue. Question now is, what's wrong during the EJB lookup? In order to resolve it, please refer to my posts above (exception stack trace, SDN article, JNDI browser).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 12:50:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281564#M1653338</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2008-08-12T12:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281565#M1653339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rama Murthy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't understand how examples referring to Sun or IBM specific configurations could be handy here.&lt;/P&gt;&lt;P&gt;Have you read the other answers in the thread before posting? Setting up properties for the InitialContext has already been discussed and also references provided. It doesn't seem to be at issue here.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2008 12:53:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281565#M1653339</guid>
      <dc:creator>Vlado</dc:creator>
      <dc:date>2008-08-12T12:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281566#M1653340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are not sure about the JNDI name of the Bean ,You should check its JNDI Name fom the ejb-j2ee-engine.xml file and if the JNDI name is not there you can specify any valid name,deploy the EJB Proj again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then try to lookup the EJB with its JNDI name instead of its Path on server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddharth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2008 08:40:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281566#M1653340</guid>
      <dc:creator>siddharth_jain</dc:creator>
      <dc:date>2008-08-20T08:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281567#M1653341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you are accessing the EJB instance from your standalone java application you can try the following:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;String url = server + ":" + port; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Properties properties = new Properties(); &lt;/P&gt;&lt;P&gt;properties.put(Context.INITIAL_CONTEXT_FACTORY,&lt;/P&gt;&lt;P&gt;"com.sap.engine.services.jndi.InitialContextFactoryImpl"); &lt;/P&gt;&lt;P&gt;properties.put(Context.PROVIDER_URL, url); &lt;/P&gt;&lt;P&gt;//properties.put (Context.SECURITY_PRINCIPAL, "Administrator"); &lt;/P&gt;&lt;P&gt;//properties.put(Context.SECURITY_CREDENTIALS, "password_here"); &lt;/P&gt;&lt;P&gt;properties.put("force_remote", "true"); &lt;/P&gt;&lt;P&gt;intialcontext = new InitialContext(properties); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try without force_remote property as well i think it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by doing this you can get the initial context now you have to look up your ejb accordingly .&lt;/P&gt;&lt;P&gt;Check this SAP help on how to Look UP Remote and Local interfaces of EJB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/38/3e5a4201301453e10000000a155106/frameset.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/38/3e5a4201301453e10000000a155106/frameset.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;See the "Lookup from a Non-J2EE Java Application " section of the above link i think you should lookup your EJB using the approaches given in this section .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope This will help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddharth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Aug 2008 12:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281567#M1653341</guid>
      <dc:creator>siddharth_jain</dc:creator>
      <dc:date>2008-08-21T12:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281568#M1653342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddarth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I already tested all of your answers but nothing of that work. But I am now sure that I won't get the JNDI context. But I dont know why. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My code is actually looking like this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;String contextFactory = "com.sap.engine.services.jndi.InitialContextFactoryImpl";&lt;/P&gt;&lt;P&gt;			   System.out.println ("contextfactory" + contextFactory );&lt;/P&gt;&lt;P&gt;			   Properties properties = new Properties();&lt;/P&gt;&lt;P&gt;			   properties.put(Context.INITIAL_CONTEXT_FACTORY, contextFactory);&lt;/P&gt;&lt;P&gt;			   //properties.put("force_remote", "true");&lt;/P&gt;&lt;P&gt;			   properties.put(Context.PROVIDER_URL, "server_url");&lt;/P&gt;&lt;P&gt;			   properties.put(Context.SECURITY_PRINCIPAL, "user");&lt;/P&gt;&lt;P&gt;			   properties.put(Context.SECURITY_CREDENTIALS, "password");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;			Context ctx = new InitialContext(properties);&lt;/P&gt;&lt;P&gt;			System.out.println("Context:" + ctx);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//			   Look up the home interface using the JNDI name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//			   This JNDI lookup returns a reference to an EJBHome instance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;			TestHome home = (TestHome) ctx.lookup("sap.com/TestWorldEar/TestBean");&lt;/P&gt;&lt;P&gt;			System.out.println("TestHome:" + home);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//			   Create a session object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;			remote = home.create();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2008 09:10:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281568#M1653342</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-09-02T09:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: JNDI InitialContext Error</title>
      <link>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281569#M1653343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Updated:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i think You are trying to lookup the Remote home interface using the procedure of Local home Interface lookup,For local home interface lookup  you have to prefix localejbs before the default Jndi name of the Bean.&lt;/P&gt;&lt;P&gt;Check the default name under Visual Admin.&lt;/P&gt;&lt;P&gt;And rest of the lookup code is fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But in case of Remote home lookup the lookup syntex will be different:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;BeanHome Home = (&amp;lt;Bean&amp;gt;Home) javax.rmi.PortableRemoteObject.narrow(ctx.lookup(&amp;lt;Default Jndi Name without localejbs prefix&amp;gt;),&amp;lt;Bean&amp;gt;Home.class); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the Following link Also See the last reply.&lt;/P&gt;&lt;P&gt;&lt;A class="jive_macro jive_macro_message" href="https://community.sap.com/" __jive_macro_name="message" modifiedtitle="true" __default_attr="6034937"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Siddharth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Siddharth Jain on Sep 4, 2008 6:36 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2008 03:58:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/jndi-initialcontext-error/qaa-p/4281569#M1653343</guid>
      <dc:creator>siddharth_jain</dc:creator>
      <dc:date>2008-09-04T03:58:16Z</dc:date>
    </item>
  </channel>
</rss>

