Clarity Upgrade fails on deleting or moving directory
search cancel

Clarity Upgrade fails on deleting or moving directory

book

Article ID: 246168

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Clarity upgrade fails when deleting a folder in the Home directory:

E:\Clarity_Install_Files\install-packages\15.9.2\upgrade-repack.15.9.2.910tpexcludes\install.xml:254: Unable to delete directory E:\Clarity\config
 at org.apache.tools.ant.taskdefs.Move.deleteDir(Move.java:322)
 at org.apache.tools.ant.taskdefs.Move.deleteDir(Move.java:293)

or when moving a folder / files to the backup directory: 

6/1/23 12:28 PM (ExecTask) Moving 29999 files to C:\clarity_16.0.3.1009
6/1/23 12:28 PM (ExecTask) 
6/1/23 12:28 PM (ExecTask) BUILD FAILED
6/1/23 12:28 PM (ExecTask) E:\Clarity_Install_Files\install-packages\16.1.0\upgrade-repack.16.1.0.959tpexcludes\gateway.xml:44: The following error occurred while executing this line:
6/1/23 12:28 PM (ExecTask) E:\Clarity_Install_Files\install-packages\16.1.0\upgrade-repack.16.1.0.959tpexcludes\install.xml:202: The following error occurred while executing this line:
6/1/23 12:28 PM (ExecTask) E:\Clarity_Install_Files\install-packages\16.1.0\upgrade-repack.16.1.0.959tpexcludes\install.xml:242: The following error occurred while executing this line:
6/1/23 12:28 PM (ExecTask) E:\Clarity_Install_Files\install-packages\16.1.0\upgrade-repack.16.1.0.959tpexcludes\install.xml:419: The following error occurred while executing this line:
6/1/23 12:28 PM (ExecTask) E:\Clarity_Install_Files\install-packages\16.1.0\upgrade-repack.16.1.0.959tpexcludes\install.xml:262: Fatal error occurred while trying to process C:\clarity_16.0.3.1009 or C:\clarity

Environment

Release : Any

Resolution

This happens on the stage when the install script is deleting and moving the Clarity directory to the backup folder.

The most typical reason why this issue happens is that the folder or a file in this directory is being accessed whilst the install script ran and it could not be deleted. I.e. if you have opened properties.xml in Notepad and run install script it will fail with this error. Or if you had another Command Prompt open navigated to $clarity/config

To proceed further please make sure your files are back to initial state.

  1. Close all windows and applications on the server, including Notepad, Wordpad etc.
  2. Stop and remove services
  3. Make sure in CMD you are not accessing anything else or accessing $clarity/config, just open one fresh cmd window
  4. Navigate to $install and run the script, this should go through

In some cases we may have to reboot the whole server. Typically the steps above should resolve the issue without a reboot.

Additional Information

Note: Make sure you don't have any antivirus that is running there on this server (Clarity folder should be exception). In rare cases an antivirus could actually prevent the install script from deleting folders