Results 1 to 3 of 3
  1. #1
    Daniel is offline Member
    Join Date
    Jun 2007
    Posts
    91
    Rep Power
    0

    Default javax.naming.NameNotFoundException: ejb/RatingEJB

    Hi, Iam using the following code to access the ejb from my jsp.
    And iam getting an error. My environment is wsad5.1 + jsp + j2ee 1.3.
    My jsp code is:
    Java Code:
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "com.ibm.websphere.naming.WsInitialContextFactory");
    env.put(Context.PROVIDER_URL, "iiop://localhost:9081");
    Context context = new InitialContext(env);
    
    home = context.lookup("ejb/Hello");
    where ejb/Hello is the ejb name in ejb-jar.xml file
    Java Code:
    [Servlet Error]-[ejb/RatingEJB]: javax.naming.NameNotFoundException: ejb/RatingEJB. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound
    at com.ibm.ws.naming.ipcos.WsnOptimizedNamingImpl.do_resolve_complete_info(WsnOptimizedNamingImpl.java:964)
    thanks.

    Daniel
    Last edited by Daniel; 06-29-2007 at 02:08 AM.

  2. #2
    Eric is offline Senior Member
    Join Date
    Jun 2007
    Posts
    111
    Rep Power
    0

    Default

    It sounds like your JNDI may not be set up correctly. I'm totally unfamiliar with WSAD but if there is a way to first verify that your JNDI environment is correct first I'd start there.
    Greetings.

    Eric

  3. #3
    Daniel is offline Member
    Join Date
    Jun 2007
    Posts
    91
    Rep Power
    0

    Default

    Hi, Thanks for your reply.my problem is solved.

    The problem was with the jndi name.

    Thanks.

    Daniel:o

Similar Threads

  1. javax.microedition.io/ javax.bluetooth
    By ahtiven in forum New To Java
    Replies: 3
    Last Post: 01-13-2009, 02:54 PM
  2. Naming a Class
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-22-2007, 11:21 AM
  3. RMI naming problem
    By Robbinz in forum New To Java
    Replies: 1
    Last Post: 12-06-2007, 11:32 PM
  4. Naming conventions
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-03-2007, 09:53 AM
  5. error in JNDI naming
    By jitendra.ibs in forum Java Servlet
    Replies: 0
    Last Post: 06-08-2007, 05:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •