Tribune

Home » Alloy UI » English

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
iqbal ahmed
java.sql.SQLException
8 maggio 2012 23.00
Risposta

iqbal ahmed

Punteggio: New Member

Messaggi: 23

Data di Iscrizione: 18 aprile 2012

Messaggi recenti

hi, in portal-ext.properties i configured to connect to mySql, i have wriiten following statements in portal-ext.properties
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=root
jdbc.default.password=
whenever i run this code in eclipse its connecting to my sql database but its showing following error as shown below, how to eliminate this error.

java.sql.SQLException: Access denied for user 'lportal'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:885)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3421)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1247)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2748)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:171)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
Tejas Kanani
RE: java.sql.SQLException
8 maggio 2012 23.57
Risposta

Tejas Kanani

Punteggio: Liferay Master

Messaggi: 653

Data di Iscrizione: 6 gennaio 2009

Messaggi recenti

Hi iqbal,

Looks like you've not given password.

1
2jdbc.default.driverClassName=com.mysql.jdbc.Driver
3jdbc.default.url=jdbc:mysql://localhost/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
4jdbc.default.username=root
5[b]jdbc.default.password=[/b]


Please provide your password for root user to connect to mysql db.
iqbal ahmed
RE: java.sql.SQLException
9 maggio 2012 3.43
Risposta

iqbal ahmed

Punteggio: New Member

Messaggi: 23

Data di Iscrizione: 18 aprile 2012

Messaggi recenti

thank you for replying tejas, i have not given any password to my databse so i left it as blank
Hitesh Methani
RE: java.sql.SQLException
9 maggio 2012 3.47
Risposta

Hitesh Methani

Punteggio: Regular Member

Messaggi: 169

Data di Iscrizione: 24 giugno 2010

Messaggi recenti

Hi Iqbal,

Seeing your exception, it refers that username considered for mysql is lportal and not root, can you confirm your portal-ext

Thanks and Regards,
Hitesh Methani
Hitoshi Ozawa
RE: java.sql.SQLException
9 maggio 2012 5.14
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7954

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Information in the following page may help you.

http://drupal.org/node/34335
iqbal ahmed
RE: java.sql.SQLException
9 maggio 2012 6.20
Risposta

iqbal ahmed

Punteggio: New Member

Messaggi: 23

Data di Iscrizione: 18 aprile 2012

Messaggi recenti

Hitesh Methani:
Hi Iqbal,

Seeing your exception, it refers that username considered for mysql is lportal and not root, can you confirm your portal-ext

Thanks and Regards,
Hitesh Methani



hi hitesh,

but i am login to the database which i have specified in portal-ext.properties and its working
its throwing warning as sqlException when i run program how to correct it