This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat6: no mysql DB connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat6: no mysql DB connection" Watch "Tomcat6: no mysql DB connection" New topic
Author

Tomcat6: no mysql DB connection

Michael Oberleitner
Greenhorn

Joined: Jul 13, 2011
Posts: 16
Hello

I'm using Tomcat 6 and I need to have mysql-DB access in my application but I'm getting this error message:



This is a part which i changed to establish db access in the server.xml:


The password is correctly set.

This is the META-INF/context.xml file:


and this is the web.xml file:


and this is the code of the StartServlet:


I put the mysql-connector-java-5.1.13-bin.jar in the WEB-INF/lib folder of the application and in the apache-tomcat-6.0.26\lib folder, but it seems that tomcat isn't able to find this file.
Last time I used tomcat is three years ago and I never used tomcat 6, so I hope someone could help me here.

Best regards,
Michael
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17033
    
  26


Cannot create JDBC driver of class '' for connect URL 'null'


I really hate that message. It means that there's something wrong with your JDBC resource definition and it's not going to tell you what.


An IDE is no substitute for an Intelligent Developer.
Michael Oberleitner
Greenhorn

Joined: Jul 13, 2011
Posts: 16
I still have the same problem
When additional information is helpful please ask here, because I need db access soon.
Michael Oberleitner
Greenhorn

Joined: Jul 13, 2011
Posts: 16
The solution for this problem is that the server.xml file does not get changed:



It looks like this again.

The context.xml instead looks like this:



After this there is no more-> Cannot create JDBC driver of class '' for connect URL 'null'

regards,
Michael
 
Have you checked out Aspose?
 
subject: Tomcat6: no mysql DB connection
 
jQuery in Action, 3rd edition