Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Anurag Piyush
Could not load driverClass jdbc driver Class
20 de Fevereiro de 2013 00:41
Resposta

Anurag Piyush

Ranking: New Member

Mensagens: 24

Data de entrada: 19 de Julho de 2012

Mensagens 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
Subhash Pavuskar
RE: Could not load driverClass jdbc driver Class
20 de Fevereiro de 2013 02:25
Resposta

Subhash Pavuskar

Ranking: Regular Member

Mensagens: 234

Data de entrada: 12 de Março de 2012

Mensagens 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
RE: Could not load driverClass jdbc driver Class
20 de Fevereiro de 2013 04:27
Resposta

Adeel Aslam

Ranking: New Member

Mensagens: 18

Data de entrada: 8 de Dezembro de 2012

Mensagens recentes

Make sure that you have Setup Wizard Disabled.
Hitoshi Ozawa
RE: Could not load driverClass jdbc driver Class
21 de Fevereiro de 2013 03:34
Resposta

Hitoshi Ozawa

Ranking: Liferay Legend

Mensagens: 7954

Data de entrada: 23 de Março de 2010

Mensagens recentes

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 de Fevereiro de 2013 04:02
Resposta

Jitendra Rajput

Ranking: Liferay Master

Mensagens: 742

Data de entrada: 7 de Janeiro de 2011

Mensagens recentes

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 de Fevereiro de 2013 04:04
Resposta

Jitendra Rajput

Ranking: Liferay Master

Mensagens: 742

Data de entrada: 7 de Janeiro de 2011

Mensagens 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.