Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > javax.naming.NameNotFoundException: Name "comp/env/ejb/mybean" not found in context "java:".

Reply
Thread Tools

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

 
 
Akaketwa
Guest
Posts: n/a
 
      10-04-2006
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(NameSpac e.java:985)
at
com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(Ur lContextImpl.java:1263)
at
com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:19
at
com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:139)
at javax.naming.InitialContext.lookup(InitialContext. java:361)
at
zw.co.interlife.servlets.CreateNewMonetaryLimit.se rvice(CreateNewMonetaryLimit.java:40)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:1212)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:629)
at
com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.handleRequest(CacheServletWrapper.java:80)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:1657)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:77)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:421)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:367)
at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCallback.java:94)
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.reque stComplete(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attem ptIO(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.worke rRun(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worke r.run(WorkQueueManager.java(Compiled
Code))
at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava(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(NameSpac e.java:985)
[10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(Ur lContextImpl.java:1263)
[10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.java:19
[10/4/06 16:27:03:765 SAST] 00000039 SystemErr R at
com.ibm.ws.naming.java.javaURLContextRoot.lookup(j avaURLContextRoot.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.se rvice(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.ser vice(ServletWrapper.java:1212)
[10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:629)
[10/4/06 16:27:03:766 SAST] 00000039 SystemErr R at
com.ibm.ws.webcontainer.servlet.CacheServletWrappe r.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.read y(WCChannelLink.java:77)
[10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:421)
[10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:367)
[10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
com.ibm.ws.http.channel.inbound.impl.HttpICLReadCa llback.complete(HttpICLReadCallback.java:94)
[10/4/06 16:27:03:767 SAST] 00000039 SystemErr R at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.reque stComplete(WorkQueueManager.java(Compiled
Code))
[10/4/06 16:27:03:801 SAST] 00000039 SystemErr R at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.attem ptIO(WorkQueueManager.java(Compiled
Code))
[10/4/06 16:27:03:802 SAST] 00000039 SystemErr R at
com.ibm.ws.tcp.channel.impl.WorkQueueManager.worke rRun(WorkQueueManager.java(Compiled
Code))
[10/4/06 16:27:03:802 SAST] 00000039 SystemErr R at
com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worke r.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.j ava(Compiled Code))

 
Reply With Quote
 
 
 
 
Manish Pandit
Guest
Posts: n/a
 
      10-04-2006
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

 
Reply With Quote
 
 
 
 
Akaketwa
Guest
Posts: n/a
 
      10-04-2006
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Yappi error "context not found" Brian Python 2 02-25-2011 03:10 PM
The name <name> does not exist in the current context Montand ASP .Net 1 02-20-2008 08:09 AM
HttpContext.Current.User.Identity.Name AND Context.User.Identity.Name; nalbayo ASP .Net 2 11-11-2005 11:12 PM
Context.Items vs Context.Handler (passing values between pages) VS_NET_DEV ASP .Net 2 05-25-2004 01:16 PM
HELP! File name or class name not found during Automation operation Victoria Chin ASP General 1 09-17-2003 04:43 PM



Advertisments