C3P0連線池報錯:java.lang.NullPointerException 空指標異常
一、問題描述
連線池用的是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: [email protected] [ 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] - [email protected]: Adding task to queue -- com[email protected]2cfb4a64
DEBUG [main] - incremented pending_acquires: 2
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [2], attempts_remaining: 30
DEBUG [main] - [email protected]: Adding task to queue -- com[email protected]5474c6c
DEBUG [main] - incremented pending_acquires: 3
DEBUG [main] - Starting acquisition series. Incremented pending_acquires [3], attempts_remaining: 30
DEBUG [main] - [email protected]: Adding task to queue -- com[email protected]4b6995df
DEBUG [main] - [email protected] 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 [email protected] [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] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]500f8d8b
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - Continuing acquisition series. pending_acquires [3], attempts_remaining: 28
DEBUG [C3P0PooledConnectionPoolManager[identityToken->1hge1ih9s7bvrp514rdugr|73c6c3b2]-AdminTaskTimer] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]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] - [email protected]: Adding task to queue -- com[email protected]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();
是需要單獨一個配置檔案,與Spring中的配置的資料來源不相關,而且也不要啟動WEB專案,然後再執行測試,而是可以直接就執行測試檔案,要在src目錄下建立一個名為“c3p0-config.xml”的檔案,裡面的內容為:
<?xml version="1.0" encoding="UTF-8"?>
<c3p0-config>
<default-config>
<property name="driverClass">com.mysql.jdbc.Driver</property>
<property name="jdbcUrl">jdbc:mysql://localhost:3306/資料庫名?useUnicode=true&characterEncoding=UTF-8</property>
<property name="user">root</property>
<property name="password">密碼</property>
<property name="initialPoolSize">10</property>
<property name="maxIdleTime">30</property>
<property name="maxPoolSize">100</property>
<property name="minPoolSize">10</property>
</default-config>
</c3p0-config>
相關推薦
C3P0連線池報錯:java.lang.NullPointerException 空指標異常
一、問題描述 連線池用的是C3P0,然後寫了個工具類方便操作,程式碼如下: package com.fendo.utils; import java.sql.Connection; import java.sql.ResultSet; import java.sql.S
java.lang.NullPointerException 空指標異常問題
初學者的我在使用springmvc+mybatis時被這問題搞了2小時 百度的問題也都試著追蹤了,發現了問題但是無法解決 private CustomerService customerService; @RequestMapping("/list") publi
java.lang.NullPointerException空指標異常處理方法
這個異常大家肯定都經常遇到,異常的解釋是 “程式遇上了空指標 “,簡單地說就是呼叫了未經初始化的物件或者是不存在的物件,這個錯誤經常出現在建立圖片,呼叫陣列這些操作中,比如圖片未經初始化,或者圖片建立時的路徑錯誤等等。對陣列操作中出現空指標,很多情況下是一些剛開始學習程式設計
React Native打包時,報錯 java.lang.NullPointerException (no error message)
FAILURE: Build failed with an exception. what went wrong? java.lang.NullPointerException (no error message) This Problem created when the
java mybatis 關於中向資料庫中插入資料時,報錯java.lang.NullPointerException的問題
今天在實現向MySQL的資料庫insert一個Object資料時出現一個錯誤; org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptio
springboot連線資料庫報錯java.lang.IllegalArgumentException: jdbcUrl is required with driverClassName.
我以前的專案是用的springboot1.5.7版本,但後來另外一個專案我用了springboot2.0.2,這下連線資料庫查詢資料直接給我報錯了java.lang.IllegalArgumentException: jdbcUrl is required with driv
android JPushInterface.setAlias 報錯 java.lang.NullPointerException: Attempt to invoke virtual method
報錯內容: 06-20 16:47:49.519: E/AndroidRuntime(21018): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.zipingfang.wan
Spring boot 報錯java.lang.NullPointerException: null
新學習 Spring boot 按照網上資料搭建(相容jsp),成功啟動,正常遇見 helloworld 但頁面一直不讓用EL表示式,報錯如下:java.lang.NullPointerException: null at javax.el.CompositeELRes
idea 連線mysql資料庫瘋狂報錯 java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
IDEA連線mysql 一直瘋狂報錯 java.lang.ClassNotFoundException: com.mysql.jdbc.Driver 網上啥方法不管用,一氣之下把mysql-connector-java-5.1.7-bin.jar丟進了tomcat的lib
hbase-建立連線報錯 java.lang.OutOfMemoryError: unable to create new native thread
最近在本地電腦上連線hbase 出現錯誤 找到一篇不錯的部落格,在此記錄一下,希望能給遇到類似問題的同學提供參考 報錯資訊: java.util.concurrent.ExecutionException: java.lang.RuntimeExcept
使用json報錯java.lang.NoClassDefFoundError: nu/xom/ParentNode
pid 方案 parent depend lan found group artifact cti 解決方案: 引入xom包; eg: <dependency> <groupId>xom</groupId> <artif
使用POI操作Excel時new XSSFWorkbook ()報錯java.lang.NoSuchMethodError解決方式
lin line java sts factor 出現 class padding test 使用最新的POI3.11時,在執行 Workbook workBook = new XSSFWorkbook ();這段代碼時出現錯誤: java.lang.NoSu
【web.xml】報錯java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
sch display ldr cep .class apache blog man reload 今天搭建新的項目,雖然在web.xml中配置了ContextLoaderListener以及IntrospectorCleanupListener 如下: web.xml中部
使用hibernate報錯java.lang.ExceptionInInitializerError的處理方法
一個 error .cn 出現 nat ont 處理方法 技術 use 今天使用hibernate搭建持久層出現一個問題 原因在於 在創建user liberty時同時勾選了System Library(added to the boot class )path
eclipse運行maven項目報錯java.lang.ClassNotFoundException: xxxxxx
java maven tomcat classnotfoundexception 在eclipse中運行maven項目,出現異常——java.lang.ClassNotFoundException: org.apache.shiro.web.env.EnvironmentLoaderLi
eclipse下執行wordcount報錯 java.lang.ClassNotFoundException 解決辦法
eclipse下執行wordcount報錯 java.lang.classnotfoundexception 解決辦法eclipse下執行wordcount報錯 java.lang.ClassNotFoundException17/08/29 07:52:54 INFO Configuration.depre
重寫getColumnName()方法報錯java.lang.StackOverflowError
n) vector main thread 想法 color override 文章 nco 我在一個方法裏面初始化了一個列名,並添加了列名 columnNames = new Vector(); columnNames.add("學號");
項目報錯java.lang.ClassNotFoundException: org.common.SessionListener
ava works 點擊 class文件 就是 ima 的確 exce 技術 現象:項目報錯java.lang.ClassNotFoundException: org.common.SessionListener,並且myeclipse左側Package Explorer中
解決spring boot啟動報錯java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level
blog nbsp java In idea AS level def sdn 解決spring boot啟動報錯java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level 學習了:https://blog.cs
反射報錯java.lang.IllegalArgumentException: wrong number of arguments
tco private int 分享 技術分享 arguments oid image vat class Person{ private String name ; private String sex ; public Person(){