原创 CannotAcquireResour:A ResourcePool could not acquire a resource from its primary factory or source.

1、db2  c3p0獲取數據庫連接時報 og4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. java.sql.SQLExc

原创 c3p0連接池

1、導入包 <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</artifactId> <version>0.9.1.2</version> </depe

原创 JDBC數據庫連接

2、到得connection連接

原创 javaweb上傳文件報: java.io.FileNotFoundException:xxxat java.io.FileOutputStream.open0(Native Method)

1、上傳文件並將該文件保存到tomcate中的webapp中,報錯如下 2、原因爲file文件沒找到 3、解決方法,若文件不存在時就創建文件

原创 Mybatis 輸入映射爲包裝類型,執行報Cause: org.apache.ibatis.reflection.ReflectionException

(1)視圖類型,包裝一個類(2)map.xml SQL語句(3)報如上錯,原因爲:PersonVo類中,沒有PersonExt屬性,查看文件是有PersonExt類型的personExt屬性的,但SQL語句中,personExt屬性,首字

原创 el表達式正確,但不輸出結果

1、EL表達式輸入正確,但不顯示輸出結果,是因爲 page中沒有添加 isELIgnored="false",添加上此字段後,EL表達式輸出就正常了。  <%-- Created by IntelliJ IDEA. User:

原创 db2批處理,不用添加rewriteBatchedStatements

1、db2的批量處理 添加rewriteBatchedStatements,因添加此字段時,報 /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/jav

原创 dbcp連接池

原创 HTTP Status 500 - Servlet.init() for servlet springmvc threw exception

HTTP Status 500 - Servlet.init() for servlet springmvc threw exception type Exception report message Servlet.init() for

原创 Connections could not be acquired from the underlying database!

/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7537 "-Didea.launcher

原创 mybatis模糊查詢

(1)#{}爲佔位符,模糊查詢要使用連接符${},否則會報如下錯(2)${} ,參數若爲簡單類型,則只能爲${value},否則,會報錯(3)正確結果

原创 db2 [jcc][t4][10335][10366][4.11.77] 操作無效:連接已關閉。 ERRORCODE=-4470, SQLSTATE=08003

 (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. lo

原创 mybatis輸出結果,某列值爲null

(1)輸出結果中,若某列的值爲null(2)原因爲表的列名與java 類中的屬性名稱不一致,解決方法,二者保持一致。

原创 HTTP Status 500 - Servlet.init() for servlet MybatisOneTest threw exception

HTTP Status 500 - Servlet.init() for servlet MybatisOneTest threw exceptiontype Exception reportmessage Servlet.init()