Process Error in BG Log SQLServer The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
search cancel

Process Error in BG Log SQLServer The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.

book

Article ID: 247985

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

Process error shows in the BG log:

ERROR 2022-08-10 16:39:53,870 [Custom script execution pool-9-thread-18] utilities.BpmErrors (clarity:admin:session:none) BpmErrors::getExceptionTrace(String arg) => 
com.niku.union.utility.MessageKeyException: BPM-0704: An error occurred while executing custom script: org.apache.commons.jelly.JellyTagException: null:9:20: <sql:transaction> null:50:21: <sql:update> ROLLBACK: [CA Clarity][SQLServer JDBC Driver][SQLServer]The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
 at org.apache.commons.jelly.tags.sql.TransactionTag.doTag(TransactionTag.java:122)
 at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:248)

 

Environment

Release : All

Resolution

Find out which process/instances are failing by going to the Administration > Data Admin > Process > Instances page.
Sort by latest date and check the message matches the BG log.

Then go to the associated stored procedure and review and make sure the following blocks have a closing and that the commit is not called before a rollback.

If a rollback is needed, use it without the COMMIT statement as the COMMIT will update the database and clear out the transaction already started.

BEGIN TRAN transaction1

--code here

rollback transaction transaction1