• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Exception: Could not find datasource

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to put together a "simple" webapp with Tomcat, Hibernate, and the HyperSonic database but seem to be stymied by this exception.

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

That's it! No path or directory is given before the rest of the stack trace. I'm guessing maybe a JDBC config problem but don't know enough to make any progress.

My webapp context from server.xml is:

<Context path="" docBase="swiss" debug="4">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="swiss-" suffix=".txt"

<Resource name="jdbc/AppDS" auth="Container"

<ResourceParams name="jdbc/AppDS">


and WEB-INF/classes/hibernate.cfg.xml has



<property name="connection.datasource">java:comp/env/jdbc/AppDS</property>
<property name="show_sql">false</property>
<property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>

<!-- Mapping files -->
<mapping resource="com/oreilly/hh/Track.hbm.xml"/>



My databse lives in a db directory at the same level as WEB-INF. Any suggestions?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!