java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
it seems that you don't have commons-io in your classpath. just download it and add it. perhaps you'll need the oro package too. > -----Original Message----- > From: Tim Oliver Wagner [mailto:[EMAIL PROTECTED] > Sent: Wednesday, January 25, 2006 11:58 AM > To: [email protected] > Subject: Re: fileupload > > Am Dienstag 24 Januar 2006 14:29 schrieb Knezevic, Mihael: > > your environment (f.e. software versions) and the exact > error message > > would help to identify the error. > > Hello, > here comes the information (Programm-Versions, Source from JSP, > Error-Message). If you need more please tell me ... > > I don't know what I can try anymore ... I hope someone can > help me to solve > the problem. > > thanks in advance > > Oli > > PS: > I try to attach additionaly the error message and the jsp to the mail. > > ************************************************************** > ****************************** > Programm-Versions: > ============== > > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing) > > -rw-r--r-- 1 tow users 54K 2006-01-21 12:16 activation.jar > -rw-r--r-- 1 tow users 32K 2005-12-23 05:57 > commons-fileupload-1.1.jar > -rw-r--r-- 1 tow users 347K 2006-01-21 01:31 mail.jar > > Apache-Tomcat 5.5.12 > > ************************************************************** > ******************************* > Source-JSP: > ========= > <%@ page import ="java.io.*" %> > <%@ page import ="org.apache.commons.fileupload.*" %> > <%@ page import ="org.apache.commons.fileupload.servlet.*" %> > <%@ page import ="org.apache.commons.fileupload.disk.*" %> > <%@ page import ="java.util.*" %> > > <html> > > <head><title>Test</title></head> > > <body> > <h1> Test </h1> > > <% > if (FileUpload.isMultipartContent(request)) { > try { > out.println("<h3> Inhalt des > Geparsten:</h3>"); > // > ENCTYPE='multipart/form-data' Daten > rauslesen!!! > FileItemFactory factory = new > DiskFileItemFactory(); > ServletFileUpload upl = new > ServletFileUpload(factory); > // as soon as I uncomment the next line ... tomcat can't > execute the jsp. > // java.util.List items = > upl.parseRequest(request); > > } catch (Exception e) { > e.printStackTrace(); > } > } > > > out.println("<h3>request Variable:</h3>"); > out.println("<br/>request.getQueryString(): " + > request.getQueryString() + "<br/>"); > out.println("request.getRequestURL(): " + > request.getRequestURL() + "<br/>"); > > out.println("<h3>Multipart?</h3>"); > out.println("Ist Multipart Request (File > Upload)?: " + > FileUpload.isMultipartContent(request) + "<br/>"); > %> > > > <h1>Upload a file:</h1> > > <form action=<%= request.getRequestURL()%> method="post" > ENCTYPE='multipart/form-data'> > Datei: <input type="file" size="50" name="datei" > maxlength="10000" accept="text/*"/><br/> > <input type="submit" name="action" > value="upload file" /> > </form> > > </body> > > </html> > > ************************************************************** > ******************************* > Error-Msg: > ======= > HTTP Status 500 - > > type Exception report > > message > > description The server encountered an internal error () that > prevented it from > fulfilling this request. > > exception > > javax.servlet.ServletException: > org/apache/commons/io/output/DeferredFileOutputStream > > org.apache.jasper.runtime.PageContextImpl.doHandlePageExceptio > n(PageContextImpl.java:848) > > org.apache.jasper.runtime.PageContextImpl.handlePageException( > PageContextImpl.java:781) > > org.apache.jsp.fileupload_jsp._jspService(org.apache.jsp.fileu > pload_jsp:134) > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet > Wrapper.java:322) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet > .java:314) > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > root cause > > java.lang.NoClassDefFoundError: > org/apache/commons/io/output/DeferredFileOutputStream > > org.apache.commons.fileupload.disk.DiskFileItemFactory.createI > tem(DiskFileItemFactory.java:179) > > org.apache.commons.fileupload.FileUploadBase.createItem(FileUp > loadBase.java:500) > > org.apache.commons.fileupload.FileUploadBase.parseRequest(File > UploadBase.java:367) > > org.apache.commons.fileupload.servlet.ServletFileUpload.parseR > equest(ServletFileUpload.java:116) > > org.apache.jsp.fileupload_jsp._jspService(org.apache.jsp.fileu > pload_jsp:72) > > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > org.apache.jasper.servlet.JspServletWrapper.service(JspServlet > Wrapper.java:322) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet > .java:314) > > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264) > javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > > note The full stack trace of the root cause is available in > the Apache > Tomcat/5.5.12 logs. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
