aspose file tools*
The moose likes Tomcat and the fly likes Tomcat with mysql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat with mysql database" Watch "Tomcat with mysql database" New topic
Author

Tomcat with mysql database

Ernesto Elias-Nieland
Ranch Hand

Joined: Sep 01, 2005
Posts: 53

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


0x2B | ~0x2B
SCJD, SCJP 1.5, SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJA, IBM Test 150, 142, 700, 701, Oracle Test 1Z0-51
Ernesto Elias-Nieland
Ranch Hand

Joined: Sep 01, 2005
Posts: 53

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
 
subject: Tomcat with mysql database