I'm trying to run a web application that was designed for Jboss on Tomcat, and I'm having trouble with the database connection. Any help you can give me would be greatly appreciated!
After deploying the application, I created a datasource. I then executed the servlet that tests the "health" of the web app, including the database. When I run that servlet, I get an error stating that it can't connect to the database.
Here's the line of code that's failing:
Here's the error message that I get in /var/log/tomcat6/catalina.out:
And here's my data source config within /etc/tomcat6/context.xml
The problem is that I can't determine if the problem is in the code or in the data source configuration, and I don't know how to debug this.
Here's what I do know:
1. The db is running
2. I can query it using the mysql-client.
3. I can telnet to port 3306 on my machine
4. The servlet works perfectly well on Jboss on someone else's machine
5. I have restarted Tomcat multiple times, and the problem hasn't changed.
So here's my questions:
1. Is there a tool I can use to test Tomcat datasources?
2. Which log level do I need to dial up if I want to get more verbose JDBC error messagess?