iSeries表时出错SQL7008

iSeries表时出错SQL7008

本文介绍了更新DB2 for iSeries表时出错SQL7008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Java Web应用程序,使用Hibernate和DB2 for iSeries ,在更新表时,我得到以下错误: -


解决方案

从对这个错误消息做一些搜索,我注意到,当您以非事务模式运行插入/更新时,会发生这种情况。 的说明。

通常,您应该始终提交(如果发生异常,则回滚)您的事务。通常我从来没有将auto commit设置为true,但是在这种情况下,我想了解如果它是真正需要的,如上面的链接所述。您可以将连接中的自动提交设置为 true ,看看是否消失?



< property name =hibernate.connection.autocommitvalue =true/> p>

此外,还有一些交易教程管理与休眠。


I have a Java Web application using Hibernate and DB2 for iSeries and during update of a table I get he following error:-

解决方案

From doing some googling on this error message I noticed that it happens when you are running an insert/update in a non-transactional mode. The explanation is given here.

Generally, you should always commit (and rollback if an exception occurs) your transactions. Usually I never set auto commit to true but in this case I would like to understand if it's truly needed as mentioned in the link above. Can you set the auto commit to true in your connection to see if this goes away?

<property name="hibernate.connection.autocommit" value="true"/>

Also this link has some tutorials on transaction management with hibernate.

这篇关于更新DB2 for iSeries表时出错SQL7008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 00:10