这几天正在学习IBATIS,做一下出现错误的记录。
和Spring集成的时候,用
getSqlMapClientTemplate().queryForList("getAllStudents");查询多个记录的时候
出现这样的错误:
xception in thread "main" org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];
--- The error occurred in ibatis/config/SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the getAllStudents-AutoResultMap.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in ibatis/config/SqlMap.xml.
--- The error occurred while applying a result map.
--- Check the getAllStudents-AutoResultMap.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException
但是我单单用ibatis的时候没有出现错误。
问题出现的很蹊跷,花了两个多小时,网上轻描淡写的说了下是空值的问题。我把数据库所有默认为空的值都不上了默认值,问题居然真的解决了。究竟什么原因,我晚些时候再看看。问题解决就是好事情。
spring,ibatis集成的时候碰到问题
最新推荐文章于 2019-10-10 14:44:57 发布