Thursday, February 14, 2008

Can't upload war files to Tomcat on Windows.

You try to use the Manager to upload a war file. It fails with the following message:


root cause:
"java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream

The real root cause is that Tomcat on Windows missing the commons-io jar file the Tomcat manager code needs to work.


Fix:
1. Download commons-io-1.4.jar.
2. Place the file in /common/lib
3. Restart Tomcat.

Note the last step is very important. The Tomcat manager won't be able to use the functionality in commons-io to upload war files until you do this.

No comments: