• 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

Tomcat with mysql database

 
Ranch Hand
Posts: 53
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I try to do the security authentication for my webapp with a mysql database and the <realm> element of the server.xml file. The realm element looks like this:



When I try to start the tomcat server I get the following error message:



It seem to be a problem with the database authentication. But the admin user has sufficient privileges to access the database.

When I try to establish a manual connection from a servlet with the jdbc-api everything works fine. For this i use the following code:



Anybody an idea how to solve this problem???

Thanks,
Ernie
 
Ernesto Elias-Nieland
Ranch Hand
Posts: 53
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I got it. The mysql-connector library must be in the $tomcatroot$/common/lib directory. It is not enough to place it in the webapps/$root$/WEB-INF/lib directory. But the error message generated by the tomcat server is really strange. It should at least mention the missing driver.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic