Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems configurung DataSource

 
Mike Himstead
Ranch Hand
Posts: 178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm working through James Goodwill's "Mastering Jakarte Struts" and I'm at the point where to use a Struts powered website to access a database. The book's example uses MySql, but I'm fairly familiar with HSQLDB so I thought I should better use this. I created tables etc to fit the example and made some changes to make it work with the following versions:

HSQLDB 1.8.0.7
Struts 1.3.5
Tomcat 5.0.28

Whenever I start Tomcat and try to get data I get a NPE. After debugging I found out that I can't get a proper DataSource, the specific method returns null for me.


I created a DataSource with Tomcat's admin console, the server.xml looks like this:



web.xml:


What is the problem? The DataSource configuration or the way in which I access it in the source?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic