运行我的 Web 应用程序时,我在 JBoss 中遇到此错误,连接到 mySql。有没有人知道如何解决这个问题?
15:00:21,875 INFO [com.mchange.v2.resourcepool.BasicResourcePool] (com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1) An exception occurred while acquiring a poolable resource. Will retry.: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3558) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:919) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3996) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1284) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2142) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:781) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) [mysql-connector-java-5.1.10.jar:]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.7.0_21]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) [rt.jar:1.7.0_21]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.7.0_21]
at java.lang.reflect.Constructor.newInstance(Constructor.java:525) [rt.jar:1.7.0_21]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352) [mysql-connector-java-5.1.10.jar:]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284) [mysql-connector-java-5.1.10.jar:]
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:119) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:143) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:132) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:137) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810) [c3p0-0.9.1.2.jar:0.9.1.2]
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547) [c3p0-0.9.1.2.jar:0.9.1.2]