Issue occurs intermittently where random batches would remain "In-progress" in the Batch Manager under Recognition Server queue.
Even when Recognition Service is stopped, the Batch is unrecoverable and throws the error message:-
You may not perform this operation in a transaction. Commit or rollback your pending transaction first
Furthermore, you will also notice a Duplicate Key Entry error message:-
2021-10-07 01:44:03, 0x00000101, 1, 0x00000BCE, 0x00000000, 0x00000000, C:\Program Files (x86)\Kofax\Capture\Bin, , <ServerName>, , sessops.cpp, 578, Fatal database error - Duplicate value in index, primary key, or relationship. Changes were unsuccessful.: Violation of PRIMARY KEY constraint 'BatchStatisticsPr1'. Cannot insert duplicate key in object 'dbo.BatchStatistics'. The duplicate key value is (XXXX, XXXX). (2627)
(INSERT INTO BatchStatistics (StatisticsID,BatchID,ProcessID,UserID,StationID,StartDateTime,EndDateTime) VALUES (XXXX,XXXX,XXXX,'XXXX\User','ServerName',CONVERT(varchar(20), '<DateTime>', 126),CONVERT(varchar(20), '<DateTime>', 126))
If you query the StatisticsID, BatchID and ProcessID, you will find an entry have already been inserted.
To verify this, check the last date of entry (which is usually a past date).
This is caused by the following TFS Bug:-
Bug 1184993:Error during PDF Generator processing causes mixed documents.
Bug 1621106:Random mixed documents once running the batch through PDF Generator.
The temporary workaround would to use Kofax Capture Batch Removal Utility to export the affected batches out.
Batch can be reimported using XML Import Connector (ACXMLAI.exe) should the batch is required for processing.
A permanent solution is to apply Fix 15174.
The fix needs to be applied on-top of KC 220.127.116.11 (Fix Pack 2).
Level of Complexity
Add any references to other internal or external articles