commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <simon.kitch...@xtra.co.nz>
Subject Re: NoSuchMethodException
Date Fri, 02 Mar 2007 03:24:51 GMT

---- "Az@liS" <azalis73@gmail.com> wrote: 
> Hi all,
> this the code i execute... following the doc seems to be right... i created the war with
inside commons-fileupload-1.2.jar and commons-io-1.3.1.jar.
> but when i try to execute this
> FileItemFactory factory = new DiskFileItemFactory();
> //Create a new file upload handler
> ServletFileUpload upload = new ServletFileUpload(factory);
> Method[] mets = upload.getClass().getMethods();
> try {
> 	//FileItem  
> 	List items = upload.parseRequest(request);  <-- here i ve the error java.lang.NoSuchMethodError
> ...
> } catch() ...
> 
> i've this error:
> 
> java.lang.NoSuchMethodError: org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List;

I suspect that there are multiple copies of commons-fileupload in the classpath. Your code
is compiled against one version but at runtime another version is being found which does not
have a method with the required signature.

Regards,

Simon

---------------------------------------------------------------------
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