java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
Problem
Doing some I/O works in Struts framework, but hits following exception in file upload process.
java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
Where to download the Apache commons-io?
Solution
By default, Struts is using Apache “commons-io.jar” for its file upload process. To fix it, you have to include this library into your project dependency library folder.
1. Get Directly
Get “commons-io.jar” from official website – http://commons.apache.org/io/
2. Get From Maven
The prefer way is get the “commons-io.jar” from Maven repository
File : pom.xml
<dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> <version>1.4</version> </dependency>
Tags : struts

thanks!
thanks!
Thank you very much.
It solved my problem.
Thanks.
How do I install or include apache commons io in my version of my Java JDK which I’m running on Windows 7? I’m trying to run a java applet to read in a URL and save the contents, and its giving me an apache commons io error (which is not installed).
Thanks,
Ty
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.Error: java.lang.RuntimeException: ‘\usr\crt\Documentum’ is an invalid value for the property dfc.data.dir
com.documentum.fc.client.DfClientSupport.(DfClientSupport.java:115)
com.documentum.fc.client.DfClient.(DfClient.java:32)
com.documentum.fc.client.DfClient.getLocalClientEx(DfClient.java:71)
com.documentum.fc.client.DfClient.getLocalClient(DfClient.java:57)
itgi.hcl.help.SearchDocument.(SearchDocument.java:42)
itgi.hcl.action.PolicySearchAction.searchDocumentum(PolicySearchAction.java:271)
itgi.hcl.action.PolicySearchAction.execute(PolicySearchAction.java:58)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.
Apache Tomcat/6.0.29