File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes mysql connectivity problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "mysql connectivity problem" Watch "mysql connectivity problem" New topic

mysql connectivity problem

vinuharan haran
Ranch Hand

Joined: Feb 26, 2005
Posts: 64
I try to query mysql server through servlet.I get an exception.
I use tomcat.
Here is the Connection part of jdbc code...

Here is the portion of servlet code...

I'm confused...
please help me out...
[ July 17, 2006: Message edited by: vinuharan haran ]
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

You don't get that output from the code you posted. But let's suppose that your real code doesn't have anything commented out. You should change it to something that tells you the actual exception, like this:My prediction is that the full error reporting will tell you that a ClassNotFoundException is being thrown. If that is the case, then make sure that the jar file containing the MySQL driver is in your classpath.
I agree. Here's the link:
subject: mysql connectivity problem
It's not a secret anymore!