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

A

Akaketwa

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))
 
M

Manish Pandit

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
 
A

Akaketwa

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

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top