ibatis报错

关键词:org.springframework.dao.DataIntegrityViolationException 

在程序中进行数据库插入操作时报错如下:

未知异常:org.springframework.dao.DataIntegrityViolationException: SqlMapClient operation; SQL []; --- The error occurred in ibatis/base.xml. --- The error occurred while applying a parameter map. --- Check the addGroupChannelCompanyType-InlineParameterMap. --- Check the statement (update failed). --- Cause: com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=3, TABLEID=5136, COLNO=6, DRIVER=3.50.152; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in ibatis/base.xml. --- The error occurred while applying a parameter map. --- Check the addGroupChannelCompanyType-InlineParameterMap. --- Check the statement (update failed). --- Cause: com.ibm.db2.jcc.b.lm: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=3, TABLEID=5136, COLNO=6, DRIVER=3.50.152

原因:

所插入的表的字段不允许为空,或者属性配置错误,也有可能在程序中忘记了添加某个表的字段的属性值,仔细检查重新修改即可。

posted @ 2013-08-06 16:40  huazhiliange  阅读(1117)  评论(0编辑  收藏  举报