Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't redeploy application (using JAXB)

Tags:

jaxb

tomcat

I can't redeploy my application on Tomcat 7 on Windows. It attempts to undeploy the app but one file cannot be deleted: jaxb-impl-2.1.13.jar. I then cannot deploy the app again because the file is present.

If I restart Tomcat, I can deploy the app.

This is what I get in the log:

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

I don't get this problem on Linux, only on Windows. How can I release this file so I can redeploy my app?

like image 692
Colin Pickard Avatar asked Oct 08 '13 11:10

Colin Pickard


1 Answers

I just get clear about this problem. For the reason about locking issue, you could check apache wiki.

One of the way to resolve this problem is configuring the following properties of Context tag in context.xml:

  • antiJARLocking="true"
  • antiResourceLocking="true"
like image 178
Tatera Avatar answered Sep 23 '22 17:09

Tatera