commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Дмитрий Можейко <mozheyk...@mail.ru>
Subject Re[2]: FileUpload: java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
Date Tue, 17 Jan 2006 08:24:37 GMT
I put commons-fileupload-1.1.jar into WEB-INF/lib directory, but receive same error:(


-----Original Message-----
From: Martin Cooper <martinc@apache.org>
To: Jakarta Commons Users List <commons-user@jakarta.apache.org>, Дмитрий Можейко
<mozheyko_d@mail.ru>
Date: Fri, 13 Jan 2006 08:57:49 -0800
Subject: Re: FileUpload: java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream

> You need to put the Commons FileUpload jar (and the Commons IO jar) in the
> WEB-INF/lib directory of your web app. The problem you are seeing is almost
> certainly because you are trying to use FileUpload from a shared location
> instead of including it in your web app.
> 
> --
> Martin Cooper
> 
> 
> On 1/13/06, Дмитрий Можейко <mozheyko_d@mail.ru> wrote:
> >
> > I wrote web-application with servlet to file uploading.
> >
> > This is code-fragment:
> >
> > ...
> > 41:   FileItemFactory factory = new DiskFileItemFactory();
> >
> > 43:    ServletFileUpload upload = new ServletFileUpload(factory);
> >
> > 45:    List items = upload.parseRequest(request);
> > ...
> >
> > I put commons-fileupload-1.1.jar ${APPSRVHOME}/domains/domain1/lib/ext/
> > directory and success fully deploy it into Sun Java System Application
> > Server Platform Edition 8.1_02 (build b06-fcs)
> >
> > but i receive this runtime error:
> >
> > java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
> >
> > org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(
> > ServletFileUpload.java:116)
> >         web.UploadServlet.processRequest(UploadServlet.java:45)
> >         web.UploadServlet.doPost(UploadServlet.java:74)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
> >         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
> >         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >         sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:39)
> >         sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:25)
> >         java.lang.reflect.Method.invoke(Method.java:585)
> >         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java
> > :249)
> >         java.security.AccessController.doPrivileged(Native Method)
> >         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
> >         org.apache.catalina.security.SecurityUtil.execute(
> > SecurityUtil.java:282)
> >         org.apache.catalina.security.SecurityUtil.doAsPrivilege(
> > SecurityUtil.java:165)
> >
> >
> > Why?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message