KB-1746 Unique constraint error upon importing/saving a WebAPI
| This issue has been resolved in an Appian hotfix/new Appian version. Please apply the latest hotfix to your Appian installation or upgrade to the latest version of Appian. |
Symptoms
When attempting to import a package that contains a WebAPI or saving a WebAPI, the following error is produced intermittently:
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update;
ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (APPIANJ_PRIMARY.TEST_DATA_UC) violated
Cause
The error is generally associated with using Oracle Real Application Clusters (RAC) as the database for the Appian primary datasource.
Oracle RAC has a sequence cache on each node, which is used to determine the next sequence value. In some scenarios this caused the uniqueness constraint to be violated due to a mismatch between RAC node sequence caches.
This issue has been addressed via AN-105127 in the following Appian hotfixes/versions:
- Appian 17.2 Hotfix Package K
- Appian 17.3 Hotfix Package H
- Appian 17.4 Hotfix Package G
- Appian 18.1 Hotfix Package C
- Appian 18.2
The fix guarantees to return the correct value of the sequence in order across all nodes in the RAC cluster.
Action
Apply the latest hotfix to your Appian installation or upgrade to the latest version of Appian.
Affected Versions
This article applies to Appian 18.1 and earlier using Oracle Real Application Clusters (RAC) as the Appian primary datasource.
Last Reviewed: October 2018
