问题描述
我目前正在使用Spring Web MVC& Spring Security。
我可以在Glassfish 3.1.2上部署它,但是当我想在修复一些bug后重新部署时,我得到这个错误:
警告:查找子存档时出现异常:XXX.war
警告:DPL8031:忽略XXX_war /因为包含的存档C:\dev\ apps \glassfish3\glassfish\domains\domain1\applications\XXX将其记录为预先存在的过时文件
.glassfishStaleFiles包含:
XXX_war /
XXX_war / WEB-INF /
XXX_war / WEB-INF / lib /
XXX_war / WEB-INF / lib / spring-web-3.2.2.RELEASE.jar
事实上,spring-web-3.2.2.RELEASE.jar依然存在,当我试图删除它时,我收到一条消息,说它仍然被JVM使用。 p>
我发现这个链接:
我的问题是:有人有解决这个问题的方法吗?
开发时真的很烦人...
好吧,经过几天的研究...
我终于找到了解决方法。
我的项目层次是:
XXX.ear
--- lib /
------ XXX_Entities.jar
--- XXX_Ejb.jar
--- XXX_EjbClient.jar
--- XXX_Web.war
------ WEB-INF / lib /
--------- * libraries *
现在:
XXX.ear
--- lib /
------ XXX_Entities .jar
------ * libraries *
--- XXX_Ejb.jar
--- XXX_EjbClient.jar
--- XXX_Web.war
然后将lib文件夹添加到EAR部署程序集,它有效。 Glassfish在取消部署时会正确卸载。
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...
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.
这篇关于Spring / Glassfish 3.1.2陈旧的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!