Fórum

Could not load driverClass jdbc driver Class

thumbnail
Anurag Piyush, modificado 11 Anos atrás.

Could not load driverClass jdbc driver Class

New Member Postagens: 24 Data de Entrada: 19/07/12 Postagens Recentes
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
thumbnail
Subhash Pavuskar, modificado 11 Anos atrás.

RE: Could not load driverClass jdbc driver Class

Regular Member Postagens: 234 Data de Entrada: 13/03/12 Postagens Recentes
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, modificado 11 Anos atrás.

RE: Could not load driverClass jdbc driver Class

New Member Postagens: 22 Data de Entrada: 09/12/12 Postagens Recentes
Make sure that you have Setup Wizard Disabled.
thumbnail
Hitoshi Ozawa, modificado 11 Anos atrás.

RE: Could not load driverClass jdbc driver Class

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
You don't need to modify root.xml file if you've set the jdbc url string in portal-ext.properties
thumbnail
Jitendra Rajput, modificado 11 Anos atrás.

RE: Could not load driverClass jdbc driver Class

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes
You dont need to specify database connection in both the places .
Either use portal-ext or root.xml for database connection setting.
thumbnail
Jitendra Rajput, modificado 11 Anos atrás.

RE: Could not load driverClass jdbc driver Class

Liferay Master Postagens: 875 Data de Entrada: 07/01/11 Postagens Recentes

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.