Troubleshooting: BatchUpdateException when importing Rule-Admin-Product (RAP)
Summary
On certain systems, if the setting for database batchUpdates
is enabled in the prconfig.xml file, Rule-Admin-Product (RAP) imports will fail. Removing the batchUpdates
setting in the prconfig.xml file resolves the problem. Alternatively, if you try to import the RAP file a second or third time, the import process will succeed.
Error (example)
com.pega.pegarules.pub.database.ConnectionException: Database save using an insert failed,
Caused by SQL Problems.
Problem #1, SQLState null, Error code -4229: com.ibm.db2.jcc.am.BatchUpdateException: [jcc][t4][102][10040][3.62.73] Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch.
Use getNextException() to retrieve the exceptions for specific batched elements. ERRORCODE=-4229, SQLSTATE=null
Problem #2, SQLState 22529, Error code -253: com.ibm.db2.jcc.am.SqlDataException: A NON-ATOMIC INSERT STATEMENT SUCCESSFULLY COMPLETED FOR SOME OF THE REQUESTED ROWS, POSSIBLY WITH WARNINGS, AND ONE OR MORE ERRORS
Problem #3, SQLState 23505, Error code -803: com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: Error for batch element #3: AN INSERTED OR UPDATED VALUE IS INVALID BECAUSE INDEX IN INDEX SPACE PR4RRULE CONSTRAINS COLUMNS OF THE TABLE SO NO TWO ROWS CAN CONTAIN DUPLICATE VALUES IN THOSE COLUMNS. RID OF EXISTING ROW IS X'0000126E0B'
Suggested Approach
To prevent the BatchUpdateException during import of a RAP, review the prconfig.xml file and remove the following setting if it exists:
<env name="database/batchUpdates" value="5"/>
Alternatively, retrying the RAP a second or third time should succeed.
The Help topic about the Commit method will be refined in a future product release.
Additional Information
How to import large archive ZIP files using the Import gadget