KB-1144 Appian attempts to overwrite files in accdocs folders after an upgrade

Symptoms

After an upgrade the application server either fails to start, or, it starts successfully but uploading/creating new files sometimes fails. The following message is seen in the application server log:

java.lang.IllegalArgumentException: Attempt to write over a file that already exists: <PATH_TO_FILE_IN_ACCDOCS>

Cause

This usually happens during upgrades with improper migrations or when the contents of the _admin folder have been moved around.

The cause for this is that the Collaboration engine has a mismatch with the _admin/accdocs folders. Specifically, the Collaboration engine has an internal counter that determines the next internal filename when creating a file. If the internal file already exists, then this will cause a conflict in the filename, causing Appian startup or document creation to fail.

Action

  1. If upgrading from a previous version, make sure to copy the highest numbered engine database file *.kdb from the old directory to the new installation’s directory. If moving the *.kdb for any reason, it is also necessary to move the contents of the _admin folder.
  2. In case of an unsuccessful upgrade, roll back to a backup from before the upgrade and attempt the migration again. Do not use the existing data to roll back, as there might be additional system files generated during the unsuccessful/partial upgrade attempt.

Affected Versions

This article applies to all versions of Appian.

Last Reviewed: August 2019

Related
Recommended