This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes JDBC and the fly likes mysql connectivity problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "mysql connectivity problem" Watch "mysql connectivity problem" New topic
Author

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.
Exception:com.mysql.jdbc.Driver
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...
Thanks,
vinu.
[ July 17, 2006: Message edited by: vinuharan haran ]
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16487
    
    2

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: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: mysql connectivity problem
 
Similar Threads
Cannot find symbol
Problem with com.mysql.jdbc.Driver driver
Connecting to a remote mysql database
connecting to mysql, with java, on a mac
JDBC for MySQL