• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat with mysql database

 
Ernesto Elias-Nieland
Ranch Hand
Posts: 53
Eclipse IDE Spring Tomcat Server
  • 0
  • 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
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic