Cannot load JDBC driver class 'org.mysql.jdbc.Driver'

28971, modified 19 Years ago. Junior Member Posts: 27 Join Date: 1/22/07 Recent Posts
Hi,

I got the quick install up and running but when I try and start liferay
with mysql I get this...in catalina.out

Cannot load JDBC driver class 'org.mysql.jdbc.Driver'
java.lang.ClassNotFoundException: org.mysql.jdbc.Driver


I downloaded and put mysql-connector-java-5.0.4-bin.jar in

$TOMCAT_HOME/common/lib/ext

I edited $TOMCAT_HOME/conf/Catalina/localhost/ROOT.xml and changed

<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.hsqldb.jdbcDriver"
url="jdbc:hsqldb:lportal"
username="sa"
password=""
maxActive="20"
/>


to

<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="org.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/lportal?useUnicode=true&amp;characterEncoding=UTF-8"
username=""
password=""
maxActive="100"
maxIdle="30"
maxWait="10000"
/>

I also ran the create-mysql.sql with no problems.

Anyone have any idea what my problem is?

Thanks.
thumbnail
11291, modified 19 Years ago. Expert Posts: 451 Join Date: 6/21/06 Recent Posts
Your error looks like a jar issue. Check out the "Installation 4" presentation:
http://www.liferay.com/web/guest/documentation/4_2/development

Here's the instructions for the mysql jar:
Copy mysql.jar from C:\Training\liferay\ext\lib\development to C:\Training\liferay\ext\ext-lib\global

You'll have to deploy from the ext again after this move. It'll move the jar here: \tomcat\common\lib\ext

Please sub out the file paths with your file paths.