By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,439 Members | 1,891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,439 IT Pros & Developers. It's quick & easy.

problem while installing mysql/connector j dirver

P: 40
i want to access mysql database server from jsp program

for this i downloaded mysql-connector-java-3.1.14.zip

mysql-connector-java-3.1.14 folder contains mysql-connector-java-3.1.14-bin.jar
file.

then the mysql-connector-java-3.1.14-bin.jar is placed in classpath

after that,i started tomcat server and executed the jsp program

but i am gettting the following error
rootcause: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

if any one know how to access mysql database server using
mysql-connector-java-3.1.14 driver,please explain me....
Jul 25 '08 #1
Share this Question
Share on Google+
6 Replies


Atli
Expert 5K+
P: 5,058
Hi.

I've moved this over the Java forum, seeing how this is more of a Java problem.
Jul 25 '08 #2

100+
P: 539
Actually(for me), the jarred mysql essential was designed for ready-to-use stand-alone apps, but you can change the settings inside the manifest file....

Before doing this, please have a back-up copy of the mysql library(jar file)

Remove the INDEX.LIST

in the MANIFEST.MF
Change the Name: common into Name: com/mysql/jdbc/Driver.class

Add the following below the Name:

Java-Bean: true

Please put a new line after the last visible character on MANIFEST.MF
a must newline... ( I don't know why, maybe because their parser needs it)

and save it again, i prefer to use WinRAR for this.....

and put the modified jar file into WEB_INF


OR

extract the jar file, copy and save the com folder to WEB_INF/classes directory.

PLEASE don't forget to RESTART the tomcat server after doing this....

Hope that helps
Jul 27 '08 #3

Expert 10K+
P: 11,448
Actually(for me), the jarred mysql essential was designed for ready-to-use stand-alone apps, but you can change the settings inside the manifest file....

[ and there he goes: ripping out valuable organs from the manifest, amputating
essential information, destroying the precious jar; blood is all over the place ... ]

Hope that helps
No it does not; stay away from that .jar file; it is correct as it is. Please first
read that link I supplied on the classpath before you start operating on that
poor .jar file.

kind regards,

Jos ;-)
Jul 27 '08 #4

100+
P: 539
No it does not; stay away from that .jar file; it is correct as it is. Please first
read that link I supplied on the classpath before you start operating on that
poor .jar file.

kind regards,

Jos ;-)
My reply happens before i realized...... If i can only remove my 1st reply here, i will....
i feel guilt with what ive done here.... :(

But that is the only way i know before i got the real/proper and exact answer

regards,
sukatoa :)
Jul 27 '08 #5

Expert 10K+
P: 11,448
My reply happens before i realized...... If i can only remove my 1st reply here, i will....
i feel guilt with what ive done here.... :(

But that is the only way i know before i got the real/proper and exact answer

regards,
sukatoa :)
Ok, because you're so sorry I'll cancel the defenestration festivities ;-)

kind regards,

Jos
Jul 27 '08 #6

P: 40
after placing the mysql-connector-java-3.1.14-bin.jar file in
tomcat/webapps/root/web-inf/classes

my problem is solved i.e.,the program written in jsp is executed

thanks
Jul 28 '08 #7

Post your reply

Sign in to post your reply or Sign up for a free account.