Issues when installing APM 10.7 Service Packs/Hotfixes

Document ID : KB000115708
Last Modified Date : 24/09/2018
Show Technical Document Details
Introduction:
Hotfix patch upgrade from 10.7 to SP2 encountered errors. Need to determine resolution to upgrade issue.
Environment:
APM 10.7 hotfixes and service packs.
Instructions:
Seeing in log.

2018-09-12 13:23:19,827 [main] INFO  com.ca.fix.command.CopyFile - Copying hotfix\10.7.0-HF14\DefaultMM_patched.jar to config\modules\DefaultMM.jar 
2018-09-12 13:23:19,832 [main] INFO  com.ca.fix.command.DeleteTree - deleting folder product\enterprisemanager\configuration\org.eclipse.osgi 
2018-09-12 13:23:19,917 [main] ERROR com.ca.fix.apm.hotfix.Hotfix - Error while executing the scenario 
java.nio.file.DirectoryNotEmptyException: product\enterprisemanager\configuration\org.eclipse.osgi\bundles\183 
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source) 
at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source) 
at java.nio.file.Files.delete(Unknown Source) 
at com.ca.fix.command.DeleteTree$1.postVisitDirectory(DeleteTree.java:78) 
at com.ca.fix.command.DeleteTree$1.postVisitDirectory(DeleteTree.java:1) 
at java.nio.file.Files.walkFileTree(Unknown Source) 
at java.nio.file.Files.walkFileTree(Unknown Source) 
at com.ca.fix.command.DeleteTree.executeImpl(DeleteTree.java:52) 
at com.ca.fix.command.CommandBase.execute(CommandBase.java:40) 
at com.ca.fix.HotfixBase.executeCommand(HotfixBase.java:168) 
at com.ca.fix.HotfixBase.deleteTree(HotfixBase.java:189) 
at com.ca.fix.apm.hotfix.Hotfix.emHotfix(Hotfix.java:787) 
at com.ca.fix.apm.hotfix.Hotfix.scenario(Hotfix.java:127) 
at com.ca.fix.HotfixBase.apply(HotfixBase.java:121) 
at com.ca.fix.HotfixBase.execute(HotfixBase.java:64) 
at com.ca.fix.apm.hotfix.Hotfix.main(Hotfix.java:81) 
2018-09-12 13:23:19,917 [main] INFO  com.ca.fix.apm.hotfix.Hotfix - Rolling back the scenario 

Solution :  Clear OSGI cache if already installed per https://comm.support.ca.com/kb/how-to-clear-the-introscope-osgi-cache/kb000100299  and try reinstalling 
Additional Information:
If there is a message saying that the hotfix is already applied, then do the following:
Rename the folder in the hotfix directory and try the install again.