Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Active Contributor
0 Kudos

Backdrop: With knowledge management repository and folder management is a regular administrative task needed to support optimal business processes.

Issue: Upon attempting to logon and delete a particular folder in the Knowledge Management (KM) you encounter a deletion error which is thrown and highlighted thus signifying the deletion cannot complete "Delete failed for <folder name>".

Try to Delete the Folder

  1. Go to Content Administration > KM Content
  2. Open the context menu of a resource
  3. Select the folder of choice
  4. Click on 'Delete'

Analysis & Identifying the Root Source

The first point of analysis here is to trace the root source of the exception in order to see the full underlying operations of the system. This can be done through generic log analysis via the Log Viewer or directly through the Default Trace Error Log File.

Pinpoint the Error

  • Reproduce the issue and capture a default trace error log file.
  • Note the UserID used to reproduce the issue and the time-stamp.
  • Obtain the default trace via: the Portal folder: \usr\sap\<SID>\<J2EE_instance_number>\j2ee\cluster\<server#>\log\

Wastebasket Service - Preventing Folder Deletion

  • Upon analyzing the log viewer you will see an error exception noting 'com.sapportals.wcm.command.DeleteResourceToWastebasketCommand' which references the wastebasket service.
  • This exception highlights and issue with the WasteBasket Service itself.
  • Occasionally this exception might also show that the associated folder + document is "locked" by a user even if the folder itself is empty.

What is the Wastebasket Service?

  • Activated by default in a standard setup.
  • Provides users with a means of fail-safe deletion i.e. users can be moved (deleted) to the wastebasket and restored/recovered from this point of call if required.

Probable Cause

  • The wastebasket service is not running on the system.
  • If you navigate to the component monitor by choosing System Administration -> Monitoring -> Knowledge Management -> Component Monitor what do you see?
  • If you are presented with an exception highlight such as[impl:3]_58##0#0#Error##Plain###RID '/documents/- <Folder Name> is locked by <'User'>#
  • The wastebasket service has failed to startup due to a mis-configuration.

Fixing the Wastebasket Service & Enabling Folder Deletion

  1. Any configuration which is causing the wastebasket service startup fail needs to be removed and subsequently corrected.
  2. After making the required corrections a restart of the system should be performed so the service can start up accordingly.
  3. Once the wastebasket service is running it should then be possible to delete the resource as desired.