LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   CentOS 5:Tomcat and MySQL JDBC driver (https://www.linuxquestions.org/questions/linux-server-73/centos-5-tomcat-and-mysql-jdbc-driver-904863/)

Neruocomp 09-24-2011 10:21 PM

CentOS 5:Tomcat and MySQL JDBC driver
 
I should be simple, but its driving me crazy.

I setup sun java jdk 1.6.0 update 27(the latest before version 7), installed tomcat via yum, and downloaded the latest version of the mysql jdbc driver and placed the jar file in /usr/share/tomcat5/common/lib. Everything I've read says this should work, yet the user's site thats using this isn't working and reports that it cannot find the driver.

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found

They are using JSTL and checking the code, looks good. I made a simple one that prints out the classpath, it shows the mysql jar.

So just for kicks I try out tomcat+jdk+mysql jdbc driver on my windows computer. Again the same problem. Any ideas? I've tried putting the mysql jar in different locations, the same result.

bathory 09-25-2011 05:18 PM

Hi,

I think that the correct location is /var/lib/tomcat5/common/lib

Regards

robertjinx 09-26-2011 03:29 PM

Maybe package unixodbc you need!?!?! Im sure you need that :)


All times are GMT -5. The time now is 03:04 AM.