Discussions

EJB programming & troubleshooting: Unable to get the InitialContext()

  1. Unable to get the InitialContext() (4 messages)

    Hi friends,

    I have successfully deployed an example bean (Stateless session bean \weblogic\examples\ejb\basic\statelessSession)with the WebLogic Server 5.10. My client program gives the following errors and exceptions :

    java.lang.NoSuchMethodError: java.lang.NoSuchMethod Exception: getNameinNamespace at
    weblogic.jndi.toolkit.BasicWLContext_WLStub.ensureInitialized(BasicWLContext_WLStub.java):127)

    There are only these three lines in my main() method-

    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.TengahInitialContextFactory");
            p.put(Context.PROVIDER_URL, "t3://gtsnywltest:7001");

    new javax.naming.InitialContext(p);


    Is it some configuration problem? I have Visual Cafe 4.0 on my client machine.

    -Akhil.

  2. See Job Grunti's question and the response to that. I think that is what you are trying to do.( on Page 2). You may get the answer.
  3. See Job Gunti's question and the response to that. I think that is what you are trying to do.( on Page 2). You may get the answer.
  4. Add <weblogic-directory>/classes into Ur class path.
  5. Dear Nazilin,

    Thanks for your suggestion. But I am having <weblogic-directory>/classes into my class path. Problem still persists.

    -Akhil.