commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jorge Alzati" <j_alz...@hotmail.com>
Subject java.lang.ClassNotFoundException: org.apache.commons.fileupload.DefaultFileItem
Date Thu, 15 May 2003 06:49:29 GMT
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.java: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:806)
        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