遇到的問(wèn)題是我在頁(yè)面里添加了一個(gè)可以選擇的日期(時(shí)間框),但是選擇過(guò)日期之后,出現(xiàn)的問(wèn)題是
ERROR com.txkj.business.inform.dao.BMInformDao - org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in config/ibatis/BMInform.xml. --- The error occurred while applying a result map. --- Check the getBMInform-AutoResultMap. --- Check the result mapping for the 'INFOR_TIME' property. --- Cause: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NumberFormatException: For input string: " 02"; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in config/ibatis/BMInform.xml. --- The error occurred while applying a result map. --- Check the getBMInform-AutoResultMap. --- Check the result mapping for the 'INFOR_TIME' property. --- Cause: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NumberFormatException: For input string: " 02"2013-06-07 17:48:08,763 [http-8080-1] ERROR com.txkj.business.inform.action.BMInformAction - getBMInform error:java.lang.Exception: org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in config/ibatis/BMInform.xml. --- The error occurred while applying a result map. --- Check the getBMInform-AutoResultMap. --- Check the result mapping for the 'INFOR_TIME' property. --- Cause: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NumberFormatException: For input string: " 02"; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in config/ibatis/BMInform.xml. --- The error occurred while applying a result map. --- Check the getBMInform-AutoResultMap. --- Check the result mapping for the 'INFOR_TIME' property. --- Cause: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.NumberFormatException: For input string: " 02"
有人說(shuō)是這個(gè)'INFOR_TIME'的類型有問(wèn)題,我在實(shí)體類里定義的類型為date,它默認(rèn)讀取出來(lái)的是一串字符串,即:Fri Jun 07 17:52:00 CST 2013
什么原因呢?
1 回答

慕村225694
TA貢獻(xiàn)1880條經(jīng)驗(yàn) 獲得超4個(gè)贊
類里定義的類型為date ?那你都說(shuō)了讀取出來(lái)是字符串??!需要轉(zhuǎn)換的!
添加回答
舉報(bào)
0/150
提交
取消