Reputation: 3704
I am writing a simple FileUpload code but as I run it I alway get a long exception ...
...
root cause java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
...
I watched the FileUpload lib jars and they all are really missing DeferredFileOutputStream. So my question is where to find this DeferredFileOutputStream? What additional lib should I add to my project to have the class?
Andrew
Upvotes: 0
Views: 493
Reputation: 532
Struts is using the “commons-io.jar” library for the file upload process. You have to include this library into your project dependency library folder. Link with more information
Upvotes: 1
Reputation: 16105
You need to add Commons IO to the classpath. Commons File Upload is dependent on it.
Upvotes: 1
Reputation: 33650
DeferredFileOutputStream is part of the Apache Commons IO project. You will need to add the commons-io jar file to your project.
Upvotes: 2