Reputation: 731
I have a Java Web application using Hibernate and DB2 for iSeries
and during update of a table I get he following error:-
Error SQL7008 while updating a DB2 for iSeries table
Upvotes: 2
Views: 5637
Reputation: 731
I found the answer to my question, This occurs As CoolBeans mentioned because the table I was trying to update is not being journalled.
Add this table to Journal, here are the steps
this took care of my problem.
Upvotes: 1
Reputation: 20820
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.
This occurs because the table you are trying to update is not being journalled, and your update is being run within a transaction.
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.
Upvotes: 3