commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Cooper" <mart...@apache.org>
Subject Re: java.lang.ClassNotFoundException: org.apache.commons.fileupload.DefaultFileItem
Date Thu, 15 May 2003 21:36:50 GMT
I suspect that you don't have Commons BeanUtils in your classpath. That is a
requirement for the version of FileUpload you are using. (You need version
1.3 or later of BeanUtils.)

FYI, the dependency on BeanUtils was removed in the nightly builds recently.

--
Martin Cooper


"Jorge Alzati" <j_alzati@hotmail.com> wrote in message
news:BAY7-F35tMVhEUsebms000213d4@hotmail.com...
> The following piece of code is throwing a
java.lang.ClassNotFoundException:
> org.apache.commons.fileupload.DefaultFileItem exception and I have no idea
> why. If I remove the parseRequest call there are no exceptions. Any idea
> what I'm doing wrong or missing?
>
>                     boolean isMultipart =
> FileUpload.isMultipartContent(request);
>                     if(isMultipart){
>                         FileUpload upload = new FileUpload();
>                         upload.setRepositoryPath("/tmp");
>                         upload.setSizeMax(209715200);
>                         upload.setSizeThreshold(4096);
>                         try {
>                             java.util.List uploadedItems =
> upload.parseRequest(request);
>                         }
>                         catch (FileUploadException ex){
>                             ex.printStackTrace();
>                         }
>                     }
>
> Exception:
>
> org.apache.commons.fileupload.FileUploadException:
> java.lang.ClassNotFoundException:
> org.apache.commons.fileupload.DefaultFileItem
>         at
>
org.apache.commons.fileupload.FileUpload.getNewInstanceMethod(FileUpload.jav
a:656)
>         at
> org.apache.commons.fileupload.FileUpload.createItem(FileUpload.java:600)
>         at
> org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:473)
>         at
> org.apache.commons.fileupload.FileUpload.parseRequest(FileUpload.java:355)
>         at com.arcsight.www.fileUpload.doPost(fileUpload.java:59)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>         at org.apache.tomcat.core.Handler.service(Handler.java:287)
>         at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>         at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:80
6)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
>         at
>
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
>
>
> Thanks.
>
> _________________________________________________________________
> MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
> http://join.msn.com/?page=features/virus




Mime
View raw message