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 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

 

Workaround

This section is optional and should only be used as an alternative action if there is a massive technical debt associated with performing the action in the above section for customers (such as upgrading). It can also be used if there is a solution to the issue in the article but is more inconvenient to implement or it causes other undesirable behavior and wouldn’t warrant being an action.

Affected Versions

This section includes any relevant version information for Appian or other third/party configurations. Some examples of valid affected versions are as follows:

Last Reviewed: May 2021