It's not a secret anymore!*
The moose likes Tomcat and the fly likes Problems configurung DataSource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Problems configurung DataSource" Watch "Problems configurung DataSource" New topic
Author

Problems configurung DataSource

Mike Himstead
Ranch Hand

Joined: Apr 12, 2006
Posts: 178
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problems configurung DataSource