javax.naming.NameNotFoundException: Name "comp/env/ejb/mybean" not found in context "java:".

Discussion in 'Java' started by Akaketwa, Oct 4, 2006.

  1. Akaketwa

    Akaketwa Guest

    The bean is configured in the application deployment descriptor, but
    its giving this error in the console whenever i try to run a jsp that
    makes use of the bean. i configured ejb references in the descriptor
    and made sure the bean's jndi name is ejb/mybean. What could be the
    problem Guys? Am using WAS v6. I am looking up for the bean in my
    servlet using this:

    mybeanLH = (mybeanLocalHome)ctx.lookup("java:comp/env/ejb/mybean");

    Other beans are operating so fine within
    the same application.Maybe the following trace may assist:



    [10/4/06 16:27:03:764 SAST] 00000039 SystemErr R
    javax.naming.NameNotFoundException: Name "comp/env/ejb/mybean" not
    found in context "java:".
    at
    com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1074)
    at
    com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:985)
    at
    com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
    at
    com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:198)
    at
    com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:139)
    at javax.naming.InitialContext.lookup(InitialContext.java:361)
    at
    zw.co.interlife.servlets.CreateNewMonetaryLimit.service(CreateNewMonetaryLimit.java:40)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
    at
    com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
    at
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
    at
    com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
    at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled
    Code))
    at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled
    Code))
    at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled
    Code))
    at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled
    Code))
    at
    com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled
    Code))

    [10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
    com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1074)
    [10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
    com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:985)
    [10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
    com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
    [10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
    com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:198)
    [10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
    com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:139)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    javax.naming.InitialContext.lookup(InitialContext.java:361)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    zw.co.interlife.servlets.CreateNewMonetaryLimit.service(CreateNewMonetaryLimit.java:40)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:80)
    [10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1657)
    [10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
    com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
    [10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
    [10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
    [10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
    com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
    [10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled
    Code))
    [10/4/06 16:27:03:801 SAST] 00000039 SystemErr R at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled
    Code))
    [10/4/06 16:27:03:802 SAST] 00000039 SystemErr R at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled
    Code))
    [10/4/06 16:27:03:802 SAST] 00000039 SystemErr R at
    com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled
    Code))
    [10/4/06 16:27:03:802 SAST] 00000039 SystemErr R at
    com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
     
    Akaketwa, Oct 4, 2006
    #1
    1. Advertising

  2. What does the entry in web.xml look like? Are you sure the
    <ejb-ref-name> is ejb/mybean and not just mybean?

    -cheers,
    Manish
     
    Manish Pandit, Oct 4, 2006
    #2
    1. Advertising

  3. Akaketwa

    Akaketwa Guest

    thanx, manish u gave me a clue. i had forgotten to add an ejb reference
    to mybean in the web.xml.


    Manish Pandit wrote:
    > What does the entry in web.xml look like? Are you sure the
    > <ejb-ref-name> is ejb/mybean and not just mybean?
    >
    > -cheers,
    > Manish
     
    Akaketwa, Oct 4, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jef
    Replies:
    0
    Views:
    738
  2. jonck
    Replies:
    1
    Views:
    18,233
  3. Harman
    Replies:
    1
    Views:
    2,546
    Moiristo
    Jul 28, 2006
  4. Replies:
    0
    Views:
    960
  5. cheepu
    Replies:
    1
    Views:
    631
    cheepu
    Oct 12, 2010
Loading...

Share This Page