PDA

View Full Version : War deploy problem in Tomcat5.5.26



Dheeraj_More
23rd February 2010, 09:52 PM
When deploying a war file through the deploy upload in the tomcat manager(TC 5.5.26), following exception gets thrown

java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
org.apache.commons.fileupload.DefaultFileItemFacto ry.createItem(DefaultFileItemFactory.java:103)
org.apache.commons.fileupload.FileUploadBase.parse Request(FileUploadBase.java:350)
org.apache.commons.fileupload.FileUploadBase.parse Request(FileUploadBase.java:302)
org.apache.catalina.manager.HTMLManagerServlet.doP ost(HTMLManagerServlet.java:166)
javax.servlet.http.HttpServlet.service(HttpServlet .java:710)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)

Solution-:
This is due to a missing dependency of commons-fileupload.
Between TC 5.5.25 and 5.5.26 commons-fileupload has been updated from version 1.0 to 1.2. commons-fileupload unbundled some commons-io classes between 1.0 and 1.1, so we need to bundle commons-io with the manager webapp.
Problem can be fixed by including commons-io version 1.4 in the manager webapp.
--------------------------------------
In our case we solved as follow.
1)Remove commons-fileupload-1.0.jar file from \webapps\manager\WEB-INF\lib of Tomcat5.5.26
2)Copy attached file commons-fileupload-1.0.jar into \webapps\manager\WEB-INF\lib of Tomcat5.5.26
3)Start tomcat and deploy war file.Deployment succeeded.