1.com.ibatis.common.jdbc.exception.NestedSQLException:
2.--- The error occurred in sqlmaps/sql-t.xml.
3.--- The error occurred while applying a result map.
4.--- Check the Task.result-task-obj.
5.--- The error happened while setting a property on the result object.
6.--- Cause: net.sf.cglib.beans.BulkBeanException
7. at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
8. at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
9. at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
10. at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
11. at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
12. at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in sqlmaps/sql-t.xml.
--- The error occurred while applying a result map.
--- Check the Task.result-task-obj.
--- The error happened while setting a property on the result object.
--- Cause: net.sf.cglib.beans.BulkBeanException
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:541)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:94)
最后通过baidu一下知道了异常Cause: net.sf.cglib.beans.BulkBeanException引起的原因是数据库表中有一个可以为空的列(列的类型是number),当查询的时候由于该列没有值ibtis会用null去初始化该列,但把null类型赋值给number类型的值时,出现如上异常信息。解决方法是找到ibatis配置文件sql-t.xml中的
Java代码
1.<resultMap id="result-task-obj" class="Task_Obj">
2.<result property="duplicated" column="DUPLICATED"/>
3.</resultMap>
<resultMap id="result-task-obj" class="Task_Obj">
<result property="duplicated" column="DUPLICATED"/>
</resultMap>
Java代码
1.把
2.<result property="duplicated" column="DUPLICATED"/>
3.修改成
4.<result property="duplicated" column="DUPLICATED" nullValue="0"/>
把
<result property="duplicated" column="DUPLICATED"/>
修改成
<result property="duplicated" column="DUPLICATED" nullValue="0"/>即当DUPLICATED列对应的值为null时,会用0值初始化duplicated属性(duplicated对应其类中的数据类型是int)。修改后系统运行正常。
分享到:
相关推荐
spring-beans.jar spring-beans.jar spring-beans.jar
openbean.jar包, AndroidStudio 使用java.beans.*,需要导入这个jar包哦
在eclipose 中引入spring-beans.dtd 可以在不联网的时候编辑XML自动提示
包含spring-beans-4.0.0.RELEASE.jar,spring-beans-4.1.0.RELEASE.jar,spring-beans-4.2.0.RELEASE.jar,
springs dtd 有总是的来看看吧。
NULL 博文链接:https://chyy001.iteye.com/blog/1338488
spring-beans-3.2.8.RELEASE.jar
ssi整合时spring的总配置文件·
NULL 博文链接:https://latex.iteye.com/blog/900664
org.springframework.beans.annotation org.springframework.beans.factory org.springframework.beans.factory.access org.springframework.beans.factory.access.el org.springframework.beans.factory.annotation...
android 使用java.beans.*
赠送jar包:spring-beans-5.2.0.RELEASE.jar; 赠送原API文档:spring-beans-5.2.0.RELEASE-javadoc.jar; 赠送源代码:spring-beans-5.2.0.RELEASE-sources.jar; 赠送Maven依赖信息文件:spring-beans-5.2.0....
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.interceptor.TransactionInterceptor#0': Error setting property values; nested ...
spring beans jar包,需要另外3个包。加上log4j和logging
jellybeans.vim, 一种色彩鲜艳颜色鲜艳的 jellybeans.vimA,dark,inspired,inspired,inspired,inspired 。主要为图形化的Vim设计,但包括支持 256,88,16和 8色终端。 在 16或者 8颜色终端上,将它的颜色替换为