Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Akaketwa - 04 Oct 2006 15:43 GMT
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))
Manish Pandit - 04 Oct 2006 16:51 GMT
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 - 04 Oct 2006 17:55 GMT
thanx, manish u gave me a clue. i had forgotten to add an ejb reference
to mybean in the web.xml.

> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.