为了账号安全,请及时绑定邮箱和手机立即绑定

stuts+spring+ibats框架的应用问题

stuts+spring+ibats框架的应用问题

手掌心 2018-12-06 18:09:00
遇到的问题是我在页面里添加了一个可以选择的日期(时间框),但是选择过日期之后,出现的问题是 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 什么原因呢?
查看完整描述

1 回答

?
慕村225694

TA贡献1880条经验 获得超4个赞

类里定义的类型为date ?那你都说了读取出来是字符串啊!需要转换的!

查看完整回答
反对 回复 2018-12-16
  • 1 回答
  • 0 关注
  • 633 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信