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
- Go to Content Administration > KM Content
- Open the context menu of a resource
- Select the folder of choice
- 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.
- 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 #com.sapportals.wcm.command.DeleteResourceToWastebasketCommand#sap.com/irj#com.sapportals.wcm.command.DeleteResourceToWastebasketCommand#E005007#10396##n/a##b70095bb5f5911e4a798000002ab5054#SAPEngine_Application_Thread[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
- Any configuration which is causing the wastebasket service startup fail needs to be removed and subsequently corrected.
- After making the required corrections a restart of the system should be performed so the service can start up accordingly.
- Once the wastebasket service is running it should then be possible to delete the resource as desired.