我把家里的一个项目拿到公司的电脑上运行,家里和公司的mysql用户名和密码都是root tiger(这一点不会有错),里面都有一个数据库OA,可是在家里明明运行的好好的,到公司却报这样的错:警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@637b7d -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception: 
java.sql.SQLException: java.lang.VerifyError: (class: com/mysql/jdbc/DatabaseMetaData, method: getMaxLogicalLobSize signature: ()J) Illegal use of nonvirtual function call
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:988)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:974)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:435)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:404)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:317)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:135)
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)这是什么原因,我把公司电脑的mysql完全卸载了重安装,还是报这个错hibernateexceptionc3p0

解决方案 »

  1.   

     Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30).配置文件看看
      

  2.   


    我用这个小程序测试了一下import java.sql.*;public class TestJdbc {
    public static void main(String[] args)throws Exception{
    Class.forName("com.mysql.jdbc.Driver");
    String url = "jdbc:mysql://localhost/bbs?user=root&password=tiger";
    Connection conn = DriverManager.getConnection(url);
    conn.close();
    }
    }依然报错:Exception in thread "main" java.sql.SQLException: java.lang.VerifyError: (class: com/mysql/jdbc/DatabaseMetaData, method: supportsRefCursors signature: ()Z) Illegal use of nonvirtual function call
    但是我用eclipse的data source explorer 连接数据库用的jar包用户名密码都没变却可以连上
      

  3.   


    找到原因了,你听过jdk1.8吗,考我就在用,害了我一天多啊,把它改成jdk1.7,一切问题解决
      

  4.   


    当时我看到oracle测试版的jdk1.8有点兴奋,结果却是这般苦果