一、问题描述
连接池用的是C3P0,然后写了个工具类方便操作,代码如下:
package com.fendo.utils;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import javax.sql.DataSource;
import com.mchange.v2.c3p0.ComboPooledDataSource;
/**
* @Title: DataSourceUtils.java
* @Package com.fendo.utils
* @Description: 数据库操作工具类
* @author fendo
* @date 2017年12月2日 下午10:44:04
* @version V1.0
*/
public class DataSourceUtils {
private static ComboPooledDataSource db=new ComboPooledDataSource();
/**
* 获取数据源
* @return 连接池
*/
public static DataSource getDataSource(){
return db;
}
/**
* 释放资源
* @param conn
* @param st
* @param rs
*/
public static void CloseResource(Connection conn,Statement st , ResultSet rs){
closeResultSet(rs);
closeStaement(st);
closeConn(conn);
}
/**
* 获取连接
* @return 连接
* @throws SQLException
*/
public static Connection getConnection() throws SQLException{
return db.getConnection();
}
/**
*释放连接
* @param conn
* 连接
*/
public static void closeConn(Connection conn){
if(conn!=null){
try {
conn.close();
} catch (SQLException e) {
e.printStackTrace();
}finally{
conn = null ;
}
}
}
/**
* 释放语句执行者
* @param st
* 语句执行者
*/
public static void closeStaement(Statement st){
if(st!=null){
try {
st.close();
} catch (SQLException e) {
e.printStackTrace();
}finally{
st = null ;
}
}
}
/**
* 释放结果集
* @param rs
* 结果集
*/
public static void closeResultSet(ResultSet rs){
if(rs!=null){
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}finally{
rs = null ;
}
}
}
}
测试文件为:
Connection connection = DataSourceUtils.getConnection();
DatabaseMetaData databaseMetaData = connection.getMetaData();
ResultSet resultSet = databaseMetaData.getColumns(null,"%", tableName,"%");
刚开始一直以为其中的配置文件是由spring来管理的,所有先是启动web项目,然后再运行这个测试文件,一直报如下的错:
INFO [MLog-Init-Reporter] - MLog clients using log4j logging.
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.", exception -> null]
com.mchange.v2.cfg.DelayedLogItem [ level -> FINE, text -> "The configuration file for resource identifier 'hocon:/reference,/application,/' could not be found. Skipping.", exception -> null]
DEBUG [MLog-Init-Reporter] - Could not find resource path text file for path '/com/mchange/v2/cfg/vmConfigResourcePaths.txt'. Skipping.
DEBUG [MLog-Init-Reporter] - Could not find resource path text file for path '/mchange-config-resource-paths.txt'. Skipping.
DEBUG [MLog-Init-Reporter] - Reading VM config for path list /com/mchange/v2/log/default-mchange-log.properties, /mchange-commons.properties, hocon:/reference,/application,/, /mchange-log.properties, /
DEBUG [MLog-Init-Reporter] - The configuration file for resource identifier '/mchange-commons.properties' could not be found. Skipping.
DEBUG [MLog-Init-Reporter] - The configuration file for resource identifier 'hocon:/reference,/application,/' could not be found. Skipping.
DEBUG [MLog-Init-Reporter] - The configuration file for resource identifier '/mchange-log.properties' could not be found. Skipping.
DEBUG [MLog-Init-Reporter] - Config available to MLog library: com.mchange.v2.cfg.BasicMultiPropertiesConfig@1cb5a524 [ propertiesByResourcePaths -> {/com/mchange/v2/log/default-mchange-log.properties={com.mchange.v2.log.jdk14logging.suppressStackWalk=true}, /={java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_131\jre\bin, java.vm.version=25.131-b11, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=;, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.country=CN, user.script=, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\Source_Work\fendo-SSM, java.runtime.version=1.8.0_131-b11, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\endorsed, os.arch=amd64, java.io.tmpdir=C:\Users\fendo\AppData\Local\Temp\, line.separator=
, java.vm.specification.vendor=Oracle Corporation, user.variant=, os.name=Windows 10, sun.jnu.encoding=GBK, java.library.path=C:\Program Files\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.7\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\jre\bin;D:\SoftWare\SVN\bin;D:\Developer\apache-maven-3.5.0\bin;D:\Developer\apache-ant-1.10.1\bin;D:\Android\SDK\platform-tools;D:\kafka\zookeeper-3.5.2-alpha\zookeeper-3.5.2-alpha\bin;C:\Program Files\TortoiseGit\bin;C:\Ruby24-x64\bin;C:\Users\fendo\AppData\Local\Microsoft\WindowsApps;D:\SoftWare\Microsoft VS Code\bin;;D:\Developer\eclipse;;., java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=10.0, user.home=C:\Users\fendo, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=GBK, java.specification.version=1.8, java.class.path=D:\Source_Work\fendo-SSM\target\classes;D:\Developer\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar;D:\Developer\eclipse\plugins\org.hamcrest.core_1.3.0.v201303031735.jar;D:\MavenRepository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar;D:\MavenRepository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;D:\MavenRepository\org\mybatis\mybatis\3.2.5\mybatis-3.2.5.jar;D:\MavenRepository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\MavenRepository\org\springframework\spring-core\4.3.3.RELEASE\spring-core-4.3.3.RELEASE.jar;D:\MavenRepository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\MavenRepository\org\springframework\spring-web\4.3.3.RELEASE\spring-web-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-beans\4.3.3.RELEASE\spring-beans-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context\4.3.3.RELEASE\spring-context-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-oxm\4.3.3.RELEASE\spring-oxm-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-tx\4.3.3.RELEASE\spring-tx-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-jdbc\4.3.3.RELEASE\spring-jdbc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-webmvc\4.3.3.RELEASE\spring-webmvc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-expression\4.3.3.RELEASE\spring-expression-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-aop\4.3.3.RELEASE\spring-aop-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context-support\4.3.3.RELEASE\spring-context-support-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-test\4.3.3.RELEASE\spring-test-4.3.3.RELEASE.jar;D:\MavenRepository\com\mchange\c3p0\0.9.2.1\c3p0-0.9.2.1.jar;D:\MavenRepository\org\mybatis\mybatis-spring\1.3.0\mybatis-spring-1.3.0.jar;D:\MavenRepository\jstl\jstl\1.2\jstl-1.2.jar;D:\MavenRepository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;D:\MavenRepository\com\mchange\mchange-commons-java\0.2.11\mchange-commons-java-0.2.11.jar, user.name=fendo, java.vm.specification.version=1.8, sun.java.command=com.fendo.Generate.CodeGenerateUtils, java.home=C:\Program Files\Java\jdk1.8.0_131\jre, sun.arch.data.model=64, user.language=zh, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.8.0_131, java.ext.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\classes, java.vendor=Oracle Corporation, file.separator=\, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, sun.desktop=windows, sun.cpu.isalist=amd64}}, propertiesByPrefixes -> {com={com.mchange.v2.log.jdk14logging.suppressStackWalk=true}, ={java.runtime.name=Java(TM) SE Runtime Environment, sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_131\jre\bin, java.vm.version=25.131-b11, java.vm.vendor=Oracle Corporation, java.vendor.url=http://java.oracle.com/, path.separator=;, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, file.encoding.pkg=sun.io, user.script=, user.country=CN, sun.java.launcher=SUN_STANDARD, sun.os.patch.level=, java.vm.specification.name=Java Virtual Machine Specification, user.dir=D:\Source_Work\fendo-SSM, java.runtime.version=1.8.0_131-b11, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\endorsed, os.arch=amd64, java.io.tmpdir=C:\Users\fendo\AppData\Local\Temp\, line.separator=
, java.vm.specification.vendor=Oracle Corporation, user.variant=, os.name=Windows 10, sun.jnu.encoding=GBK, java.library.path=C:\Program Files\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.7\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\jre\bin;D:\SoftWare\SVN\bin;D:\Developer\apache-maven-3.5.0\bin;D:\Developer\apache-ant-1.10.1\bin;D:\Android\SDK\platform-tools;D:\kafka\zookeeper-3.5.2-alpha\zookeeper-3.5.2-alpha\bin;C:\Program Files\TortoiseGit\bin;C:\Ruby24-x64\bin;C:\Users\fendo\AppData\Local\Microsoft\WindowsApps;D:\SoftWare\Microsoft VS Code\bin;;D:\Developer\eclipse;;., java.specification.name=Java Platform API Specification, java.class.version=52.0, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, os.version=10.0, user.home=C:\Users\fendo, user.timezone=, java.awt.printerjob=sun.awt.windows.WPrinterJob, file.encoding=GBK, java.specification.version=1.8, user.name=fendo, java.class.path=D:\Source_Work\fendo-SSM\target\classes;D:\Developer\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar;D:\Developer\eclipse\plugins\org.hamcrest.core_1.3.0.v201303031735.jar;D:\MavenRepository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar;D:\MavenRepository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;D:\MavenRepository\org\mybatis\mybatis\3.2.5\mybatis-3.2.5.jar;D:\MavenRepository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\MavenRepository\org\springframework\spring-core\4.3.3.RELEASE\spring-core-4.3.3.RELEASE.jar;D:\MavenRepository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\MavenRepository\org\springframework\spring-web\4.3.3.RELEASE\spring-web-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-beans\4.3.3.RELEASE\spring-beans-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context\4.3.3.RELEASE\spring-context-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-oxm\4.3.3.RELEASE\spring-oxm-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-tx\4.3.3.RELEASE\spring-tx-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-jdbc\4.3.3.RELEASE\spring-jdbc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-webmvc\4.3.3.RELEASE\spring-webmvc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-expression\4.3.3.RELEASE\spring-expression-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-aop\4.3.3.RELEASE\spring-aop-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context-support\4.3.3.RELEASE\spring-context-support-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-test\4.3.3.RELEASE\spring-test-4.3.3.RELEASE.jar;D:\MavenRepository\com\mchange\c3p0\0.9.2.1\c3p0-0.9.2.1.jar;D:\MavenRepository\org\mybatis\mybatis-spring\1.3.0\mybatis-spring-1.3.0.jar;D:\MavenRepository\jstl\jstl\1.2\jstl-1.2.jar;D:\MavenRepository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;D:\MavenRepository\com\mchange\mchange-commons-java\0.2.11\mchange-commons-java-0.2.11.jar, java.vm.specification.version=1.8, sun.arch.data.model=64, java.home=C:\Program Files\Java\jdk1.8.0_131\jre, sun.java.command=com.fendo.Generate.CodeGenerateUtils, java.specification.vendor=Oracle Corporation, user.language=zh, awt.toolkit=sun.awt.windows.WToolkit, java.vm.info=mixed mode, java.version=1.8.0_131, java.ext.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\classes, java.vendor=Oracle Corporation, file.separator=\, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle, com.mchange.v2.log.jdk14logging.suppressStackWalk=true, sun.desktop=windows, sun.cpu.isalist=amd64}, sun.management={sun.management.compiler=HotSpot 64-Bit Tiered Compilers}, java.vm={java.vm.version=25.131-b11, java.vm.specification.vendor=Oracle Corporation, java.vm.specification.name=Java Virtual Machine Specification, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, java.vm.specification.version=1.8, java.vm.vendor=Oracle Corporation, java.vm.info=mixed mode}, line={line.separator=
}, sun.boot.class={sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\classes}, sun.java={sun.java.launcher=SUN_STANDARD, sun.java.command=com.fendo.Generate.CodeGenerateUtils}, sun={sun.arch.data.model=64, sun.java.launcher=SUN_STANDARD, sun.desktop=windows, sun.java.command=com.fendo.Generate.CodeGenerateUtils, sun.os.patch.level=, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\classes, sun.jnu.encoding=GBK, sun.cpu.isalist=amd64, sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_131\jre\bin, sun.cpu.endian=little, sun.io.unicode.encoding=UnicodeLittle}, sun.arch.data={sun.arch.data.model=64}, path={path.separator=;}, java={java.class.path=D:\Source_Work\fendo-SSM\target\classes;D:\Developer\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar;D:\Developer\eclipse\plugins\org.hamcrest.core_1.3.0.v201303031735.jar;D:\MavenRepository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar;D:\MavenRepository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;D:\MavenRepository\org\mybatis\mybatis\3.2.5\mybatis-3.2.5.jar;D:\MavenRepository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\MavenRepository\org\springframework\spring-core\4.3.3.RELEASE\spring-core-4.3.3.RELEASE.jar;D:\MavenRepository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\MavenRepository\org\springframework\spring-web\4.3.3.RELEASE\spring-web-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-beans\4.3.3.RELEASE\spring-beans-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context\4.3.3.RELEASE\spring-context-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-oxm\4.3.3.RELEASE\spring-oxm-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-tx\4.3.3.RELEASE\spring-tx-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-jdbc\4.3.3.RELEASE\spring-jdbc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-webmvc\4.3.3.RELEASE\spring-webmvc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-expression\4.3.3.RELEASE\spring-expression-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-aop\4.3.3.RELEASE\spring-aop-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context-support\4.3.3.RELEASE\spring-context-support-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-test\4.3.3.RELEASE\spring-test-4.3.3.RELEASE.jar;D:\MavenRepository\com\mchange\c3p0\0.9.2.1\c3p0-0.9.2.1.jar;D:\MavenRepository\org\mybatis\mybatis-spring\1.3.0\mybatis-spring-1.3.0.jar;D:\MavenRepository\jstl\jstl\1.2\jstl-1.2.jar;D:\MavenRepository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;D:\MavenRepository\com\mchange\mchange-commons-java\0.2.11\mchange-commons-java-0.2.11.jar, java.ext.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext, java.runtime.name=Java(TM) SE Runtime Environment, java.runtime.version=1.8.0_131-b11, java.vendor=Oracle Corporation, java.specification.version=1.8, java.class.version=52.0, java.specification.name=Java Platform API Specification, java.vendor.url=http://java.oracle.com/, java.awt.printerjob=sun.awt.windows.WPrinterJob, java.vm.version=25.131-b11, java.home=C:\Program Files\Java\jdk1.8.0_131\jre, java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\endorsed, java.version=1.8.0_131, java.vm.specification.version=1.8, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, java.specification.vendor=Oracle Corporation, java.vm.specification.name=Java Virtual Machine Specification, java.vm.vendor=Oracle Corporation, java.vm.info=mixed mode, java.library.path=C:\Program Files\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.7\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\jre\bin;D:\SoftWare\SVN\bin;D:\Developer\apache-maven-3.5.0\bin;D:\Developer\apache-ant-1.10.1\bin;D:\Android\SDK\platform-tools;D:\kafka\zookeeper-3.5.2-alpha\zookeeper-3.5.2-alpha\bin;C:\Program Files\TortoiseGit\bin;C:\Ruby24-x64\bin;C:\Users\fendo\AppData\Local\Microsoft\WindowsApps;D:\SoftWare\Microsoft VS Code\bin;;D:\Developer\eclipse;;., java.vm.specification.vendor=Oracle Corporation, java.vm.name=Java HotSpot(TM) 64-Bit Server VM, java.io.tmpdir=C:\Users\fendo\AppData\Local\Temp\}, file={file.separator=\, file.encoding.pkg=sun.io, file.encoding=GBK}, file.encoding={file.encoding.pkg=sun.io}, java.vendor.url={java.vendor.url.bug=http://bugreport.sun.com/bugreport/}, com.mchange.v2.log={com.mchange.v2.log.jdk14logging.suppressStackWalk=true}, java.ext={java.ext.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext}, sun.boot={sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_131\jre\bin, sun.boot.class.path=C:\Program Files\Java\jdk1.8.0_131\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_131\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_131\jre\classes}, java.specification={java.specification.version=1.8, java.specification.vendor=Oracle Corporation, java.specification.name=Java Platform API Specification}, sun.io.unicode={sun.io.unicode.encoding=UnicodeLittle}, os={os.version=10.0, os.name=Windows 10, os.arch=amd64}, sun.os={sun.os.patch.level=}, com.mchange.v2={com.mchange.v2.log.jdk14logging.suppressStackWalk=true}, sun.boot.library={sun.boot.library.path=C:\Program Files\Java\jdk1.8.0_131\jre\bin}, sun.io={sun.io.unicode.encoding=UnicodeLittle}, java.runtime={java.runtime.version=1.8.0_131-b11, java.runtime.name=Java(TM) SE Runtime Environment}, java.class={java.class.path=D:\Source_Work\fendo-SSM\target\classes;D:\Developer\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar;D:\Developer\eclipse\plugins\org.hamcrest.core_1.3.0.v201303031735.jar;D:\MavenRepository\javax\servlet\servlet-api\2.3\servlet-api-2.3.jar;D:\MavenRepository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;D:\MavenRepository\org\mybatis\mybatis\3.2.5\mybatis-3.2.5.jar;D:\MavenRepository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\MavenRepository\org\springframework\spring-core\4.3.3.RELEASE\spring-core-4.3.3.RELEASE.jar;D:\MavenRepository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\MavenRepository\org\springframework\spring-web\4.3.3.RELEASE\spring-web-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-beans\4.3.3.RELEASE\spring-beans-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context\4.3.3.RELEASE\spring-context-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-oxm\4.3.3.RELEASE\spring-oxm-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-tx\4.3.3.RELEASE\spring-tx-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-jdbc\4.3.3.RELEASE\spring-jdbc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-webmvc\4.3.3.RELEASE\spring-webmvc-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-expression\4.3.3.RELEASE\spring-expression-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-aop\4.3.3.RELEASE\spring-aop-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-context-support\4.3.3.RELEASE\spring-context-support-4.3.3.RELEASE.jar;D:\MavenRepository\org\springframework\spring-test\4.3.3.RELEASE\spring-test-4.3.3.RELEASE.jar;D:\MavenRepository\com\mchange\c3p0\0.9.2.1\c3p0-0.9.2.1.jar;D:\MavenRepository\org\mybatis\mybatis-spring\1.3.0\mybatis-spring-1.3.0.jar;D:\MavenRepository\jstl\jstl\1.2\jstl-1.2.jar;D:\MavenRepository\org\freemarker\freemarker\2.3.23\freemarker-2.3.23.jar;D:\MavenRepository\com\mchange\mchange-commons-java\0.2.11\mchange-commons-java-0.2.11.jar, java.class.version=52.0}, com.mchange={com.mchange.v2.log.jdk14logging.suppressStackWalk=true}, java.awt={java.awt.printerjob=sun.awt.windows.WPrinterJob, java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment}, java.vm.specification={java.vm.specification.vendor=Oracle Corporation, java.vm.specification.name=Java Virtual Machine Specification, java.vm.specification.version=1.8}, sun.os.patch={sun.os.patch.level=}, java.library={java.library.path=C:\Program Files\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_131/bin/../jre/lib/amd64;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\MySQL\MySQL Server 5.7\bin;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Java\jdk1.8.0_131\jre\bin;D:\SoftWare\SVN\bin;D:\Developer\apache-maven-3.5.0\bin;D:\Developer\apache-ant-1.10.1\bin;D:\Android\SDK\platform-tools;D:\kafka\zookeeper-3.5.2-alpha\zookeeper-3.5.2-alpha\bin;C:\Program Files\TortoiseGit\bin;C:\Ruby24-x64\bin;C:\Users\fendo\AppData\Local\Microsoft\WindowsApps;D:\SoftWare\Microsoft VS Code\bin;;D:\Developer\eclipse;;.}, sun.arch={sun.arch.data.model=64}, com.mchange.v2.log.jdk14logging={com.mchange.v2.log.jdk14logging.suppressStackWalk=true}, java.vendor={java.vendor.url.bug=http://bugreport.sun.com/bugreport/, java.vendor.url=http://java.oracle.com/}, java.io={java.io.tmpdir=C:\Users\fendo\AppData\Local\Temp\}, java.endorsed={java.endorsed.dirs=C:\Program Files\Java\jdk1.8.0_131\jre\lib\endorsed}, sun.jnu={sun.jnu.encoding=GBK}, user={user.name=fendo, user.timezone=, user.country=CN, user.dir=D:\Source_Work\fendo-SSM, user.home=C:\Users\fendo, user.language=zh, user.script=, user.variant=}, sun.cpu={sun.cpu.endian=little, sun.cpu.isalist=amd64}, awt={awt.toolkit=sun.awt.windows.WToolkit}} ]
INFO [main] - Initializing c3p0-0.9.2.1 [built 20-March-2013 10:47:27 +0000; debug? true; trace: 10]
DEBUG [main] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1hge1ih9s7bvrp514rdugr|73c6c3b2,name=1hge1ih9s7bvrp514rdugr|73c6c3b2 registered.
DEBUG [main] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1hge1ih9s7bvrp514rdugr|73c6c3b2,name=1hge1ih9s7bvrp514rdugr|73c6c3b2 unregistered, in order to be reregistered after update.
DEBUG [main] - MBean: com.mchange.v2.c3p0:type=PooledDataSource,identityToken=1hge1ih9s7bvrp514rdugr|73c6c3b2,name=1hge1ih9s7bvrp514rdugr|73c6c3b2 registered.
INFO [main] - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge1ih9s7bvrp514rdugr|73c6c3b2, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> null, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge1ih9s7bvrp514rdugr|73c6c3b2, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> null, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, preferredTestQuery -> null, properties -> {}, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, userOverrides -> {}, usesTraditionalReflectiveProxies -> false ]
DEBUG [main] - incremented pending_acquires: 1
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [1], attempts_remaining: 30
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2cfb4a64
DEBUG [main] - incremented pending_acquires: 2
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [2], attempts_remaining: 30
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@5474c6c
DEBUG [main] - incremented pending_acquires: 3
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [3], attempts_remaining: 30
DEBUG [main] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@4b6995df
DEBUG [main] - com.mchange.v2.resourcepool.BasicResourcePool@2fc14f68 config: [start -> 3; min -> 3; max -> 15; inc -> 3; num_acq_attempts -> 30; acq_attempt_delay -> 1000; check_idle_resources_delay -> 0; mox_resource_age -> 0; max_idle_time -> 0; excess_max_idle_time -> 0; destroy_unreturned_resc_time -> 0; expiration_enforcement_delay -> 0; break_on_acquisition_failure -> false; debug_store_checkout_exceptions -> false]
DEBUG [main] - Created new pool for auth, username (masked): 'null'.
DEBUG [main] - acquire test -- pool size: 0; target_pool_size: 3; desired target? 1
DEBUG [main] - awaitAvailable(): [unknown]
DEBUG [main] - trace com.mchange.v2.resourcepool.BasicResourcePool@2fc14f68 [managed: 0, unused: 0, excluded: 0]
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#0] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#2] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#1] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 29
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@5113f779
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#1] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 29
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@5fd4132b
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#1] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 29
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@5beb9c09
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#1] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 28
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@1ee91910
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#1] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 28
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@500f8d8b
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 28
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@2fbd81ea
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#1] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#0] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 27
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@28b14bc0
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#0] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 27
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@7ec6e65f
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 27
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#0] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - com.mchange.v2.async.ThreadPoolAsynchronousRunner@71f2a7d5: Adding task to queue -- com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask@52894fd9
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-HelperThread-#0] - An exception occurred while acquiring a poolable resource. Will retry.
java.lang.NullPointerException
at com.mysql.fabric.jdbc.FabricMySQLDriver.parseFabricURL(FabricMySQLDriver.java:97)
at com.mysql.fabric.jdbc.FabricMySQLDriver.acceptsURL(FabricMySQLDriver.java:93)
at java.sql.DriverManager.getDriver(DriverManager.java:299)
at com.mchange.v2.c3p0.DriverManagerDataSource.driver(DriverManagerDataSource.java:240)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:131)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:156)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:145)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:200)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1086)
at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1073)
at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:44)
at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1810)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
二、解决方法
最后发现,通过ComboPooledDataSource获取的连接
ComboPooledDataSource db=new ComboPooledDataSource();
com.mysql.jdbc.Driver
jdbc:mysql://localhost:3306/数据库名?useUnicode=true&characterEncoding=UTF-8
root
密码
10
30
100
10