You are currently reviewing an older revision of this page.

DRAFT KB-[SP-6076] Creating or importing WebAPI fails with error "could not insert: [com.appiancorp.webapi.WebApi]"

Symptoms

Creating or importing a webAPI in /design fails with the following error in the application server log:

webApi <UUID> "<WEBAPI_NAME>": An error occurred while creating webApi [uuid=<UUID>]: org.hibernate.exception.ConstraintViolationException: could not insert: [com.appiancorp.webapi.WebApi] (APNX-1-4071-007)
...
Caused by: java.sql.SQLException: Duplicate entry '<EXTENSION NAME>-<HTTP METHOD>-0' for key 'webapi_aliasmethod_idx'


Cause

A WebAPI with the same extension already exists in the environment. WebAPI extension names are saved to the primary database and must be unique.

Action

Rename the extension of the WebAPI to be unique. This can be the extension of the WebAPI being created/imported, or the existing WebAPI.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: June 2021