I am updating an application to the newest version of Struts. I deploy the application to Tomat 9.0.8 by copying the WAR file into the $TOMCAT_HOME/webapps directory. When the application redeploys, Tomcat displays an error:
The weird thing is, the 1-physician directory is the temp directory for the old version of the application. If I look in that directory, most of the application files have been deleted except web/WEB-INF/lib, which contains all the dependency JAR files except for that one. There will be a new temp directory, in this case, 3-physician, created for the new deployment with all the application files.
After this, the application throws a bunch of exceptions if I try to access pages:
I have to restart Tomcat to get the application to run again. Deploying the application in this way was never an issue before. Any ideas as to why now?
Up until about the middle of the Tomcat 8 releases, copying a WAR into TOMCAT_HOME/webapps when a webapp of the same name was already deployed via exploding would cause the new WAR to be ignored and the existing webapp in the webapps subdirectory with the same name as the WAR to continue to be used. After that point, supposedly things changed and now you're (theoretically) able to deploy a new version of a webapp just by copying a WAR.
In any event, hot-deploy on Tomcat has been dicey for a very long time, so the safest approach is to terminate Tomcat, delete all the files/subdirectories in the Tomcat work, temp, logs, and webapps directories that are related to that webapp, copy in the WAR to the webapps directory and restart Tomcat.
This is all based on the default cases. If you have a deployment descriptor in TOMCAT_HOME/conf/Catalina/localhost pointing to some other location for the webapp code, if you have auto-explosion turned off, or certain other non-default options set, your results may vary.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.