pem.removeSubscription OA API method fails with error:
"org.hibernate.exception.ConstraintViolationException: could not execute statement"
The following could be seen in the
for MSSQL database:
Caused by: java.sql.SQLException: The DELETE statement conflicted with the REFERENCE constraint "domain_hosting_bindings_fk2". The conflict occurred in database "plesk", table "dbo.domain_hosting_bindings", column 'subscription_id'.
for PostgreSQL database:
Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "subscriptions" violates foreign key constraint "sb_customers_fk2" on table "sb_customers" Detail: Key (sub_id)=(10000111) is still referenced from table "sb_customers".
Database inconsistency: subscription has linked data, located in several tables, expected to be removed already. A consequence of some canceled tasks in the past.
Contact Odin Technical Support to resolve the issue.