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

Hibernate - "Could not find datasource"

 
vidya archana
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am writting an application using Hibernate and Tomcat5.0 as the app server. When I try to connect to the data base using jndi, I am getting error messgae like this

net.sf.hibernate.HibernateException: Could not find datasource

The same configuration settings work in other machines.(like server.xml, hibernate.cfg.xml and mapping resource xml )

Pls help in solving this issue

Thanks

Vidya
 
Dave Salter
Ranch Hand
Posts: 293
Java Mac OS X Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like your datasource isn't configured correctly via JNDI. What does your setup look like in Tomcat for this?

Have you tried accessing the datasource via JDBC rather than Hibernate to verify that the datasource is deployed correctly (e.g. there are no missing jars etc).

Cheers,

Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic