Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 60784 invoked from network); 4 Jun 2003 20:14:29 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 4 Jun 2003 20:14:29 -0000 Received: (qmail 20685 invoked by uid 97); 4 Jun 2003 20:16:48 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 20678 invoked from network); 4 Jun 2003 20:16:48 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 4 Jun 2003 20:16:48 -0000 Received: (qmail 60595 invoked by uid 500); 4 Jun 2003 20:14:27 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 60564 invoked from network); 4 Jun 2003 20:14:25 -0000 Received: from jim.skynet.lt (212.122.68.65) by daedalus.apache.org with SMTP; 4 Jun 2003 20:14:25 -0000 Received: (qmail 13800 invoked by uid 85); 4 Jun 2003 20:15:15 -0000 Received: from baliuka@centras.lt by jim.skynet.vl with qmail-scanner-1.03 (. Clean. Processed in 3.523682 secs); 04 Jun 2003 20:15:15 -0000 X-Qmail-Scanner-Mail-From: baliuka@centras.lt via jim.skynet.vl X-Qmail-Scanner: 1.03 (Clean. Processed in 3.523682 secs) Received: from unknown (HELO user) (10.1.17.1) by post.skynet.lt with SMTP; 4 Jun 2003 20:15:11 -0000 Message-ID: <00bd01c32ad5$e6569360$0111010a@user> From: "Juozas Baliuka" To: "Jakarta Commons Developers List" References: Subject: Re: Commons Upload Problems... Date: Wed, 4 Jun 2003 22:14:27 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2720.3000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2727.1300 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N read this: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html and http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/loader.html ----- Original Message ----- From: "Wilson, Allen" To: "Jakarta Commons Developers List" Sent: Wednesday, June 04, 2003 9:59 PM Subject: RE: Commons Upload Problems... > Martin... > > Thanks for the help...I going to do some searching to see if there are > some other methods for doing the file upload..... > > Allen > > -----Original Message----- > From: Wilson, Allen > Sent: Wednesday, June 04, 2003 2:43 PM > To: Jakarta Commons Developers List > Subject: RE: Commons Upload Problems... > > > I've looked through the lib and classes directories of Tomcat in an > attempt to identify the location of the jar file. I did not locate it. > Is it part of another jar file (commons jar). > > Allen > > -----Original Message----- > From: Martin Cooper [mailto:martinc@apache.org] > Sent: Wednesday, June 04, 2003 2:35 PM > To: Jakarta Commons Developers List > Subject: RE: Commons Upload Problems... > > > > > On Wed, 4 Jun 2003, Wilson, Allen wrote: > > > Yes..I have...I checked over and over...I actually even tried > un-jarring > > the jar file into the correct path...yet I still get errors > > I see you're using Tomcat. Depending on the version of Tomcat, that may > have its own FileUpload jar in it somewhere, and that may be causing the > problem. > > You won't be able to replace Tomcat's version with RC1 because of API > changes, but you should be able to ensure that your web app picks up > your > copy of FileUpload instead of the one bundled with Tomcat. > > -- > Martin Cooper > > > > > > Allen > > > > -----Original Message----- > > From: Martin Cooper [mailto:martinc@apache.org] > > Sent: Wednesday, June 04, 2003 1:49 PM > > To: Jakarta Commons Developers List > > Subject: RE: Commons Upload Problems... > > > > > > > > > > On Wed, 4 Jun 2003, Wilson, Allen wrote: > > > > > Okay... > > > > > > I have change to the RC1 version and I am getting some of the same > > > things....here is the exception listings.... > > > > Are you sure you don't still have an old jar in your classpath? I'm > > using > > the RC1 build without problems. > > > > -- > > Martin Cooper > > > > > > > > > > message > > > > > > description The server encountered an internal error () that > prevented > > > it from fulfilling this request. > > > > > > exception > > > > > > javax.servlet.ServletException: Servlet execution threw an exception > > > at java.lang.Throwable.fillInStackTrace(Native Method) > > > at java.lang.Throwable.fillInStackTrace(Compiled Code) > > > at java.lang.Throwable.(Compiled Code) > > > at java.lang.Exception.(Compiled Code) > > > at javax.servlet.ServletException.(Compiled Code) > > > at > > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Compile > > > d Code) > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled > > Code) > > > at filters.ExampleFilter.doFilter(ExampleFilter.java:149) > > > at > > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Compile > > > d Code) > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled > > Code) > > > at org.apache.catalina.core.StandardWrapperValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.catalina.core.StandardContextValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at > > > > > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator > > > Base.java:493) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.catalina.core.StandardContext.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.StandardHostValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at > > > org.apache.catalina.valves.ErrorDispatcherValve.invoke(Compiled > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.valves.ErrorReportValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.valves.AccessLogValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.catalina.core.StandardEngineValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.coyote.tomcat4.CoyoteAdapter.service(Compiled > > > Code) > > > at org.apache.coyote.http11.Http11Processor.process(Compiled > > > Code) > > > at > > > > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC > > > onnection(Compiled Code) > > > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled > > > Code) > > > at > > > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled > > > Code) > > > at java.lang.Thread.run(Thread.java:479) > > > > > > > > > root cause > > > > > > java.lang.NoSuchMethodError: > > > org.apache.commons.fileupload.MultipartStream: method > > > setHeaderEncoding(Ljava/lang/String;)V not found > > > at > > > org.apache.commons.fileupload.FileUploadBase.parseRequest(Compiled > > Code) > > > at FileTransfer.doPost(FileTransfer.java:37) > > > at javax.servlet.http.HttpServlet.service(Compiled Code) > > > at javax.servlet.http.HttpServlet.service(Compiled Code) > > > at > > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Compile > > > d Code) > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled > > Code) > > > at filters.ExampleFilter.doFilter(ExampleFilter.java:149) > > > at > > > > > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Compile > > > d Code) > > > at > > > org.apache.catalina.core.ApplicationFilterChain.doFilter(Compiled > > Code) > > > at org.apache.catalina.core.StandardWrapperValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.catalina.core.StandardContextValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at > > > > > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator > > > Base.java:493) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.catalina.core.StandardContext.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.StandardHostValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at > > > org.apache.catalina.valves.ErrorDispatcherValve.invoke(Compiled > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.valves.ErrorReportValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.valves.AccessLogValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.catalina.core.StandardEngineValve.invoke(Compiled > > > Code) > > > at > > > > > > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i > > > nvokeNext(Compiled Code) > > > at org.apache.catalina.core.StandardPipeline.invoke(Compiled > > > Code) > > > at org.apache.catalina.core.ContainerBase.invoke(Compiled Code) > > > at org.apache.coyote.tomcat4.CoyoteAdapter.service(Compiled > > > Code) > > > at org.apache.coyote.http11.Http11Processor.process(Compiled > > > Code) > > > at > > > > > > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC > > > onnection(Compiled Code) > > > at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Compiled > > > Code) > > > at > > > > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Compiled > > > Code) > > > at java.lang.Thread.run(Thread.java:479) > > > > > > > > > -----Original Message----- > > > From: Martin Cooper [mailto:martinc@apache.org] > > > Sent: Wednesday, June 04, 2003 12:53 PM > > > To: Jakarta Commons Developers List > > > Subject: Re: Commons Upload Problems... > > > > > > > > > It seems that the version of FileUpload you are using is > inconsistent > > > with > > > the code you are writing. You are writing to the new API (good!), > but > > > the > > > version of FileUpload you are using has the old API (bad). If you > grab > > > the > > > latest version of FileUpload, you should be fine. (The RC1 version > is > > > up, > > > it's just not announced yet.) > > > > > > -- > > > Martin Cooper > > > > > > > > > On Wed, 4 Jun 2003, Wilson, Allen wrote: > > > > > > > Hello... > > > > > > > > > > > > I've posted messages in reference to using the FileUpload and it > > seems > > > > that I am still having problems. I am now trying to put the class > > > > together line by line so that if I run into problems I can > > > successfully > > > > identify the line and try to fix the problem/exception error. Here > > is > > > > the code I have so far and it gives me the following error: > > > > > > > > javax.servlet.ServletException: Servlet execution threw an > exception > > > > > > > > With the root cause information of: > > > > > > > > java.lang.NoSuchMethodError: > > > > org.apache.commons.fileupload.DefaultFileItem: method > > > > > > > > > > (Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;ILjava/io/File;) > > > > V not found > > > > at > > > > > > > > > > org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultF > > > > ileItemFactory.java:231) > > > > at > > > > org.apache.commons.fileupload.FileUploadBase.createItem(Compiled > > Code) > > > > at > > > > org.apache.commons.fileupload.FileUploadBase.parseRequest(Compiled > > > Code) > > > > at FileTransfer.doPost(FileTransfer.java:37) > > > > > > > > > > > > The code: > > > > > > > > import java.io.*; > > > > import java.util.*; > > > > import javax.servlet.*; > > > > import java.sql.*; > > > > import javax.servlet.http.*; > > > > > > > > import org.apache.commons.fileupload.*; > > > > > > > > public class FileTransfer extends HttpServlet > > > > { > > > > private String strSQLStart = "Insert into tblPortal Files ("; > > > > private String strSQLMid = " rec_id, dateupload) values ("; > > > > private String strSQLEnd = " Null, curdate())"; > > > > > > > > private String fieldnames = ""; > > > > private String fieldvalues = ""; > > > > > > > > public void doPost(HttpServletRequest req, HttpServletResponse > > > > res) > > > > throws ServletException, IOException > > > > { > > > > res.setContentType("text/html"); > > > > PrintWriter out = res.getWriter(); > > > > > > > > DiskFileUpload upload = new DiskFileUpload(); > > > > > > > > //set paramaters for files > > > > upload.setSizeMax(10000); > > > > upload.setRepositoryPath("/tmp"); > > > > > > > > out.println(""); > > > > out.println("MARC Research File > > > > Upload"); > > > > out.println(""); > > > > out.println("File Upload Parameters:"); > > > > > > > > try > > > > { > > > > List uploadItems = upload.parseRequest(req); > > > > <-------- This is line 37 > > > > } > > > > > > > > catch (FileUploadException fue) > > > > { > > > > fue.printStackTrace(out); > > > > } > > > > > > > > out.println(""); > > > > } > > > > } > > > > > > > > > > > > I am trying to figure my way through it and any help would be > > > > appreciated..... > > > > > > > > > > > > Thanks....Allen > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > ---------------------------------------------------------------------------- ---- > This message may contain proprietary or confidential company information. > Any unauthorized use or disclosure is prohibited. > > > ---------------------------------------------------------------------------- ---- > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org