开发者社区 问答 正文

执行insert操作时报错,求问错误原因 <b> ?报错

在程序执行一个insert操作时,出现报错,求问各位大佬问题出在哪里?
报错为:
org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0];

--- The error occurred while applying a parameter map.

--- Check the IfapChatRecord.insertSelective-InlineParameterMap.

--- Check the parameter mapping for the 'content' property.

--- Cause: java.lang.IllegalStateException: Spring transaction synchronization needs to be active for setting values in iBATIS TypeHandlers that delegate to a Spring LobHandler; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:

--- The error occurred while applying a parameter map.

--- Check the IfapChatRecord.insertSelective-InlineParameterMap.

--- Check the parameter mapping for the 'content' property.

--- Cause: java.lang.IllegalStateException: Spring transaction synchronization needs to be active for setting values in iBATIS TypeHandlers that delegate to a Spring LobHandler

展开
收起
爱吃鱼的程序员 2020-06-23 00:10:14 1198 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    ibatis插入Blob类型,操作要在事务中进行

    ---ChecktheIfapChatRecord.insertSelective-InlineParameterMap.

    ---Checktheparametermappingforthe'content'property.

    检查下content这个属性是否有问题

    看第一句没有打印出sql啊,检查一下sql语句是否正确

    具体:https://www.xuebuyuan.com/724316.html

    2020-06-23 00:10:32
    赞同 展开评论
问答分类:
问答地址: