Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while using Hibernate with Tomcat 5.0

 
Shishir malviya
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi frnds,
Please help me out.
Datasource name :java:/sewaDS
I am using Hibernate with Tomcat 5.0 and while connecting with Database which is MySQL i am getting the following error :


SEVERE: Could not find datasource: java:/sewaDS
javax.naming.NameNotFoundException: Name sewaDS is not bound in this Context
at org.apache.naming.NamingContext.lookup(NamingContext.java:768)
at org.apache.naming.NamingContext.lookup(NamingContext.java:151)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionP
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionPr
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:362)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:60)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at com.vision.test.util.HibernateUtils.<clinit>(HibernateUtils.java:17)
at com.vision.test.action.BaseControllerImpl.getSessionFactory(BaseControllerImpl.java:7
at com.vision.test.action.BaseControllerImpl.getSession(BaseControllerImpl.java:80)
at com.vision.test.action.BaseControllerImpl.displayUser(BaseControllerImpl.java:35)
at com.vision.test.action.LoginUserDisplay._callMethod(LoginUserDisplay.java:61)
at com.vision.test.action.LoginUserDisplay.execute(LoginUserDisplay.java:17)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at org.andromda.presentation.bpm4struts.ActionServlet.doPost(ActionServlet.java:48)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
at org.displaytag.filter.ResponseOverrideFilter.doFilter(ResponseOverrideFilter.java:125
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:10
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.jav
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:10
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:10
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:10
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:10
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Htt
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well the datasource is not bound or not bound under this name....

where/how do you bind the datasource ?

pascal
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic