• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Tomcat with mysql database

 
Ranch Hand
Posts: 53
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!