• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Datasource lookup

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am having issue for the datasource lookup. I am using ejb 3.0, without ejb-jar.xml, ibm-ejb-jar-bnd.xml. I am using WebSphere 6.1.
Appreciate if anyone can help me on this.

Here is my code


Here is the error i get.
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R javax.naming.NameNotFoundException: Name "comp/env/BelsizeDS" not found in context "java:".
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1095)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:205)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:145)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at javax.naming.InitialContext.lookup(InitialContext.java:363)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.belsize.sb.SB_UtilityBean.getConnection(SB_UtilityBean.java:43)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.belsize.sb.EJSRemote0SLSB_UtilityBean_5da3f048.getConnection(EJSRemote0SLSB_UtilityBean_5da3f048.java)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.belsize.sb._SB_UtilityBeanRemote_Stub.getConnection(_SB_UtilityBeanRemote_Stub.java)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at com.belsize.module.Accessright.createAccessright(Accessright.java:95)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at pagecode.Welcome.doWelcome_executeAction(Welcome.java:81)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[4/13/12 10:52:48:447 SGT] 0000001c SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at java.lang.reflect.Method.invoke(Method.java:618)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:127)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:73)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at javax.faces.component.UICommand.broadcast(UICommand.java:312)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:302)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:419)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:239)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:91)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1146)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:593)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:535)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:764)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1478)
[4/13/12 10:52:48:448 SGT] 0000001c SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:133)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:450)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:508)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:296)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)
[4/13/12 10:52:48:449 SGT] 0000001c SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1551)
 
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mary Koh wrote:
javax.naming.NameNotFoundException: Name "comp/env/BelsizeDS" not found in context "java:".



just verify this whether the name comp/env/BelsizeDS really exists in context java on your machine.
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Anurag,

Where can I verify that? I have the datasource setup at WebSphere server.
 
Anurag Verma
Ranch Hand
Posts: 171
Hibernate Spring Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not familiar with WebSphere, but probably WebSphere has an admin console where you can configure & see the all the JNDIs available on server. I am not very sure, but this could be of some help -

http://www.2netave.com/goodies/JndiDB2/index.htm

http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.express.doc%2Finfo%2Fexp%2Fae%2Fuejb_provjndi.html

http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp?topic=%2Fcom.ibm.websphere.wesb.doc%2Fdoc%2Fcadm_slsbjndi.html
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic