I'm currently developping an application using Spring Web MVC & Spring Security.
I can deploy it on Glassfish 3.1.2 but when I want to redeploy after some bug fixing, I get this error :
WARNING: Exception while locating sub archive: XXX.war
WARNING: DPL8031: Ignoring XXX_war/ because the containing archive C:\dev\apps\glassfish3\glassfish\domains\domain1\applications\XXX recorded it as a pre-existing stale file
.glassfishStaleFiles contains :
XXX_war/
XXX_war/WEB-INF/
XXX_war/WEB-INF/lib/
XXX_war/WEB-INF/lib/spring-web-3.2.2.RELEASE.jar
And indeed, spring-web-3.2.2.RELEASE.jar still exists and when I try to remove it, I get a message that says It's still in use by JVM.
I found this link : https://www.java.net//forum/topic/glassfish/glassfish/stale-files-when-undeploying-web-app-glassfish-3
My question is : does someone have a workaround for this issue ?
It's really annoying while developping...
To correct this problem, I have an easier solution :
Assuming your EAR file is correct:
It did the trick for me.
Ok, after some days of research...
I finally found how to get around.
My project hierarchy was :
XXX.ear
--- lib/
------ XXX_Entities.jar
--- XXX_Ejb.jar
--- XXX_EjbClient.jar
--- XXX_Web.war
------ WEB-INF/lib/
--------- *libraries*
Now :
XXX.ear
--- lib/
------ XXX_Entities.jar
------ *libraries*
--- XXX_Ejb.jar
--- XXX_EjbClient.jar
--- XXX_Web.war
Then add lib folder to EAR deployment assembly and it works. Glassfish unload correctly when undeploying.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With