Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mySQL Driver Class not found

Status
Not open for further replies.

Shilohcity

Technical User
Jul 12, 2000
136
GB
Hi there

I was running Tomcat 3 and connecting to a mySQL db with no worries. Now that I have upgraded to Tomcat 4.0.2 I am getting class not found errors for the mySQL driver. I have tried this in my web-inf/classes/ directory, in the common/lib/ directory all with no luck.

Any ideas most appreciated.

Justin X-) "Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer

Visit me at
 
You are ambiguous as to whether you were using jar or had unzipped the class files out of jar. Sorry for below, I am sure I am stating the obvious.

java classes common to all web applications can go into
tomcat/common/classes and should be visible on restart.

jar's common to all web applications can go into
common/lib and should be visible on restart.

If for a specific application then put class files in app/WEB-INF/classes
and jar's in app/WEB-INF/lib

Maybe the inclusion of the common/ stuff is not working as advertised.
Also, in your application, make sure that WEB-INF directory is really upper case. I recall having problems when it was not.

Best Regards, pfist
 
You are ambiguous as to whether you were using jar or had unzipped the class files out of jar. Sorry for below, I am sure I am stating the obvious.

java classes common to all web applications can go into
tomcat/common/classes and should be visible on restart.

jar's common to all web applications can go into
common/lib and should be visible on restart.

If for a specific application then put class files in app/WEB-INF/classes
and jar's in app/WEB-INF/lib

Maybe the inclusion of the common/ stuff is not working as advertised.
Also, in your application, make sure that WEB-INF directory is upper case. I recall having problems when it was not.

Best Regards, pfist
 
Hi pfist

Thanks for the suggestions.

I have tried both .jar and unzipped class files in all of the locations outlined above. Using Tomcat 3 I had the class files in my webapp Web-INF/classes dir. After uninstalling Tomcat 4 and returning to Tomcat 3 this works fine so it seems to only be under Tomcat 4 this doesn't work for me anyways.

I am open to any further suggestions though...


Thanks
Justin X-) "Creativity is the ability to introduce order into the randomness of nature." Eric Hoffer

Visit me at
 
I don't have any other suggestions other than I have had different kinds of problems when 'WEB-INF' directory is not all upper case.

Sorry I couldn't help.

pfist
 
i started working with mmmysql jdbc the other day.
i didn't really know where to put the jar but it's currently in jakarta-tomcat-4.0.4-b1/lib/ and it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top