Question
Infosys
IN
Last activity: 12 Aug 2015 7:45 EDT
pyCommitError while saving a workobject
I receive an error messge "There was a problem saving an instance of class : Error Code: SQL State: Message:" whenever we try to commit a workobject. On running the tracer we see that the Step "Commit" in the activity "CommitWithErrorHandling" is failing. Any reasons for this? This has worked without any issues previously
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Infosys
IN
we were able to resolve the issue. The issue was at the db end, where one of the tables by mistake had been changed to read only access. It is now changed to readwrite and the issue is resolved
Hi Gaurav,
Just a thought: Do you have locking enabled for the class of these instances. If so, are you doing proper lock handling while you save this. Please let me know if this works, otherwise can you please share a screen shot and the error message.
Cheers,
Shan
Infosys
IN
Hi Shanmukha,
The lock handling is configured properly. The error message does not give any indication on what the error message might be: "There was a problem saving an instance of class : Error Code: SQL State: Message:". Will try and attach a screenshot in sometime.
Even the the tracer does not give any indiacation as to why the commit is failing. Any place from where i can get this information?
You may try finding the error in logs.
Infosys
IN
Hi Shanmukha,
On seeing the logs i see that the message is very generic. It says "caused by SQL problems". DB2 SQL error. We are not using any custom SQL in the code
Ok, Two things i could make out from the logs:
1. You have opened a work object and trying to attach something and committing it. Right? If you are doing so, you should not explicitly commit the work object because when you do so, it will generate a new transaction ID and you will not be able to save it.
2. If the above scenario is not the case, find out how much free space you have in this schema.
Please let me know how this works for you.
Pegasystems Inc.
US
If you are getting transaction ID mismatches, you should be seeing that in the logs. The fact that the commit fails due to a database error tells me that something in the transaction is bad, but the DB can't error on it until the commit. You may want to know what's on the deferred list. DB2 doesn't like something there. There might be some logging/tracing that you can do on the database side that would be helpful, since knowing exactly which piece of the transaction that you are trying to commit it's failing on will help you focus in on how to fix it.
Accepted Solution
Infosys
IN
we were able to resolve the issue. The issue was at the db end, where one of the tables by mistake had been changed to read only access. It is now changed to readwrite and the issue is resolved