1

Ibm liberty app redeployment of war with mbeans fail with below error, war fully copied to dropin but due this error, war not exploding at all.could see few jars from previous installment in exploded/appname/web-inf/lib folder.

How to resolve this issue, is there any way to explicitly delete exploded war with mbean?

-----Start of DE processing----- = [2/10/21, 23:49:58:526 IST]
Exception = java.io.IOException
Source = com.ibm.ws.app.manager.war.internal.WARDeployedAppInfoFactoryImpl
probeid = 113
Stack Dump = java.io.IOException: Failed to delete [ C:\IBM\WebSphere\Liberty\usr\servers\Libertyhost\apps\expanded\test.war ] because [ C:\IBM\WebSphere\Liberty\usr\servers\Libertyhost\apps\expanded\test.war\WEB-INF\lib\com.us.tracking-21.2.0.1.jar ] could not be deleted.
at com.ibm.ws.app.manager.war.internal.WARDeployedAppInfoFactoryImpl.expand(WARDeployedAppInfoFactoryImpl.java:71)
at com.ibm.ws.app.manager.war.internal.WARDeployedAppInfoFactoryImpl.createDeployedAppInfo(WARDeployedAppInfoFactoryImpl.java:107)
at com.ibm.ws.app.manager.war.internal.WARDeployedAppInfoFactoryImpl.createDeployedAppInfo(WARDeployedAppInfoFactoryImpl.java:35)
at com.ibm.ws.app.manager.war.internal.WARApplicationHandlerImpl.setUpApplicationMonitoring(WARApplicationHandlerImpl.java:50)
at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:139

looks like few jars are locked by the server and redeployment fails.

user961524
  • 537
  • 1
  • 7
  • 19
  • 1
    Does this happen consistently with the same file? Sometimes on Windows a virus checker or other program can temporarily access a file which causes it to be locked when something else tries to delete it. From your question, it's not clear whether you're using the dropins directory or manually starting the app with an mbean. If you are manually starting it, make sure it is fully stopped before starting it again. If it's in dropins, the server should have released any file locks when the application was stopped, but you could also try deleting the file from dropins before you copy in an update. – Brent Daniel Feb 15 '21 at 22:22
  • Brent Daniel 1)stoping the app with mbean 2)removing the from dropins with mbean 3)copying the war to dropin with mbean 4)starting the app with mbean . when i checked the process, the process with is locking the jar is liberty server itself and mostly the issue happens when the redeployment jar has updated and webinf/lib/jars which has js files rendered in browser. followed the reference at https://github.com/jenkinsci/websphere-deployer-plugin/blob/dee6e165ac380d31477f1b6439b34524ce4464ad/src/main/java/org/jenkinsci/plugins/websphere_deployer/LibertyDeployerPlugin.java – user961524 Feb 16 '21 at 03:50

0 Answers0