user592704
user592704

Reputation: 3704

FileUpload thows exception - help

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

Answers (3)

Nook
Nook

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

Piyush Mattoo
Piyush Mattoo

Reputation: 16105

You need to add Commons IO to the classpath. Commons File Upload is dependent on it.

Upvotes: 1

Greg
Greg

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

Related Questions