遇到的问题是我在页面里添加了一个可以选择的日期(时间框),但是选择过日期之后,出现的问题是
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"
有人说是这个'INFOR_TIME'的类型有问题,我在实体类里定义的类型为date,它默认读取出来的是一串字符串,即:Fri Jun 07 17:52:00 CST 2013
什么原因呢?
类里定义的类型为date ?那你都说了读取出来是字符串啊!需要转换的!