You are on page 1of 2

2016-12-27 Page 1/2

2401417 - Unable to Delete a Folder in KM


Version 2 Type SAP Knowledge Base Article
Language English Master Language English
Release Status Released to Customer Category Problem
Component EP-KM-CM (KM Content Management) Released On 07.12.2016

Please find the original document at https://launchpad.support.sap.com/#/notes/2401417

Symptom

When attempting to delete a folder in KM, the folder is not deleted and the following error is returned -

An exception of the following type is generated in the default.trc file -

failed to delete folder <Path to folder location>/<fileID>.<filetype>] is locked by [<UserID>]


at
com.sapportals.wcm.repository.manager.cm.persistence.BasicPersistenceDB.checkProtectedRIDExt(BasicPer

When you navigate to the folder shown in the above exception, the file referenced does not exist in KM
and the lock cannot therefore be released

Environment

EP Release Independent
SAP NetWeaver

Reproducing the Issue

1. Navigate to folder location in KM Content


2. Click on the context menu for the folder you wish to delete and select 'Delete'
3. Message 'No Status Information available' is returned and folder is not deleted

Cause

This behavior would generally be encountered if a locked file exists within the folder you are attempting to
delete. It may also be encountered when attempting to move a folder. Before the move or delete operation can
be completed it will be necessary to remove the lock. This should either be removed manually by an Admin
user or by the user who locked the file. If the 'locked' file does not exist in KM, it is recommended to run the 'CM
Repository DB Check' report in an attempt to delete the orphaned lock. Should this fail, it may be necessary to
delete the lock manually at DB level.

Resolution

First, the following the steps should be performed in an effort to resolve the issue -

1. Navigate to Content Administration > KM Content


2. Here, navigate to the file which is locked as outlined in the exception in the default.trc file

3. SAP SE or an SAP affiliate company. All rights reserved


© 2016
2016-12-27 Page 2/2
3. Using an Admin user, click the context menu of the problematic file and select 'Unlock'
4. Should the file not exist, you should instead run the CM Repository DB Check tool as described in the
SAP Help Documentation - CM Repository DB Check
Note - after the report runs, you should use the 'Commands' tab to remove any orphaned content

If the above steps fail to resolve the issue, it may be necessary to remove the lock directly on the DB through
the following steps -

1. Create a full backup of the DB (this is just in case the incorrect resource is deleted below)
2. Select * from kmc_dbrm_locks
3. If, within the result set of Step 2, a record is returned where the RID column contains the affected
resource name, ie. "<path to folder>/<fileID>.<filetype>" (as shown in exception generated in default.trc)
then proceed with the following -
4. Delete only the record as of Step 3, ie. where the RID is '<path to folder>/<filename>.<filetype>' out of the
'kmc_dbrm_locks' table
5. Navigate to the folder in KM Content once more and try to delete the resource again

Keywords

Enterprise Portal 7.0, EP 7.0, Enterprise Portal 7.01, EP 7.01, Enterprise Portal 7.02, EP 7.02, Enterprise Portal
7.03, EP 7.03, Enterprise Portal 7.30, EP 7.30, Enterprise Portal 7.31, EP 7.31, Enterprise Portal 7.40, EP 7.4,
Enterprise Portal 7.50, EP 7.5, file, folder, KM, locked, Unable to delete, CM Repository DB Check, failed to
delete folder, is locked by, No Status Information Available

Products

SAP NetWeaver 7.0


SAP NetWeaver 7.3
SAP NetWeaver 7.4
SAP NetWeaver 7.5
SAP enhancement package 1 for SAP NetWeaver 7.0
SAP enhancement package 1 for SAP NetWeaver 7.3
SAP enhancement package 2 for SAP NetWeaver 7.0
SAP enhancement package 3 for SAP NetWeaver 7.0

This document refers to

SAP Note/KBA Title

CM Repository DB Check

Terms of use | Copyright | Trademark | Legal Disclosure | Privacy

© 2016 SAP SE or an SAP affiliate company. All rights reserved