Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Anurag Piyush
Could not load driverClass jdbc driver Class
20 febbraio 2013 0.41
Risposta

Anurag Piyush

Punteggio: New Member

Messaggi: 24

Data di Iscrizione: 19 luglio 2012

Messaggi recenti

Hi

I am using liferay6.1. I am trying to migrate database into MySql using control panel->Server->Data migration tab.
I have filled following details

jdbc driver ClassName=com.mysql.jdbc.Driver
jdbc url=jdbc:mysql://localhost:3306/lportal
jdbc username=root
jdbc password=root

When I clicked on Execute button it throws following error and database doesnot migrate.

08:28:07,134 WARN [DriverManagerDataSource:107] Could not load driverClass jdbc driver Class
Name=com.mysql.jdbc.Driver
java.lang.ClassNotFoundException: jdbc driver ClassName=com.mysql.jdbc.Driver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688
)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533
)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at com.mchange.v2.c3p0.DriverManagerDataSource.ensureDriverLoaded(DriverManagerDataSo
urce.java:100)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.
java:132)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperCon
nectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolMan
ager.acquireResource(C3P0PooledConnectionPool.java:148)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:101
4)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32
)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.ja
va:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchr
onousRunner.java:547)




Someone on the forum wiritten that it happens due to mysql jar file not found. but i have checked in my liferay bundle, Mysql jar file is there. I have also set class path explicitly but it is not working

Can anybody help me.

Thanks
Anurag
Subhash Pavuskar
RE: Could not load driverClass jdbc driver Class
20 febbraio 2013 2.25
Risposta

Subhash Pavuskar

Punteggio: Regular Member

Messaggi: 234

Data di Iscrizione: 12 marzo 2012

Messaggi recenti

Hi Anurag ,

Did you set the portal-ext.properties from classes folder and Root.xml from Tomcat config folder?
i.e
for portal-ext.properties File
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/Liferay6.1.1?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=root


And Root.xml File
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/Liferay6.1.1?useUnicode=true&amp;characterEncoding=UTF-8"
username="root"
password="root"
maxActive="20"
/>


After setting these Then Restart your server !!
Adeel Aslam
RE: Could not load driverClass jdbc driver Class
20 febbraio 2013 4.27
Risposta

Adeel Aslam

Punteggio: New Member

Messaggi: 18

Data di Iscrizione: 8 dicembre 2012

Messaggi recenti

Make sure that you have Setup Wizard Disabled.
Hitoshi Ozawa
RE: Could not load driverClass jdbc driver Class
21 febbraio 2013 3.34
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7990

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

You don't need to modify root.xml file if you've set the jdbc url string in portal-ext.properties
Jitendra Rajput
RE: Could not load driverClass jdbc driver Class
21 febbraio 2013 4.02
Risposta

Jitendra Rajput

Punteggio: Liferay Master

Messaggi: 709

Data di Iscrizione: 7 gennaio 2011

Messaggi recenti

You dont need to specify database connection in both the places .
Either use portal-ext or root.xml for database connection setting.
Jitendra Rajput
RE: Could not load driverClass jdbc driver Class
21 febbraio 2013 4.04
Risposta

Jitendra Rajput

Punteggio: Liferay Master

Messaggi: 709

Data di Iscrizione: 7 gennaio 2011

Messaggi recenti


Could not load driverClass jdbc driver Class
Name=com.mysql.jdbc.Driver
java.lang.ClassNotFoundException: jdbc driver ClassName=com.mysql.jdbc.Driver



Seems like you have pasted complete "jdbc driver ClassName=com.mysql.jdbc.Driver" in text box.
Correct it or specify setting inside portal-ext.