我无法在Windows上的Tomcat 7上重新部署我的应用程序。它尝试取消部署应用程序,但无法删除一个文件:
jaxb-impl-2.1.13.jar
。然后我无法再次部署应用程序,因为该文件存在。
如果我重新启动Tomcat,我可以部署该应用程序。
这是我在日志中得到的:
Oct 08, 2013 12:00:28 PM org.apache.catalina.startup.HostConfig deleteRedeployResources
INFO: Undeploying context [/myApp]
Oct 08, 2013 12:00:28 PM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\myApp\WEB-INF\lib] could not be completely deleted. The presence of the remaining files may cause problems
Oct 08, 2013 12:00:28 PM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\myApp\WEB-INF] could not be completely deleted. The presence of the remaining files may cause problems
Oct 08, 2013 12:00:28 PM org.apache.catalina.startup.ExpandWar deleteDir
SEVERE: [C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\myApp] could not be completely deleted. The presence of the remaining files may cause problems
Oct 08, 2013 12:00:28 PM org.apache.catalina.startup.ExpandWar delete
SEVERE: [C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0\webapps\myApp] could not be completely deleted. The presence of the remaining files may cause problems
我不会在Linux上遇到此问题,仅在Windows上。如何发布此文件以便重新部署我的应用程序?
答案 0 :(得分:4)
我只是清楚这个问题。有关锁定问题的原因,您可以查看apache wiki。
解决此问题的方法之一是在Context
中配置context.xml
代码的以下属性:
antiJARLocking="true"
antiResourceLocking="true"