• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat6: no mysql DB connection

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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.
 
Michael Oberleitner
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still have the same problem
When additional information is helpful please ask here, because I need db access soon.
 
Michael Oberleitner
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic