• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception: Could not find datasource  RSS feed

Steve Bigham
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!