• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems configurung DataSource  RSS feed

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

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:

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:


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
Boost this thread!