You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dirk Griesbach <dg...@eurocom-depora.de> on 2003/12/04 14:41:57 UTC

Re: TC 4 <-oreillyMultipart-> TC5: Corrupt form data: premature ending

Another issue came up comparing TC4 and TC5:

using the oreilly multipart lib on TC5 causes the error
"...Corrupt form data: premature ending" on POST uploads.

As stated in the FAQ's at http://www.servlets.com/cos/faq.html
this problem is merely due to the webcontainer and has been fixed with
Tomcat 4.

I tested and can state that this problem doesn't occur with TC4.
But it is apparent with TC5 again.
Will this be fixed ?

grisi

----- Original Message -----
From: Shapira, Yoav <Yo...@mpi.com>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Wednesday, December 03, 2003 3:53 PM
Subject: RE: TC 4 <-oreillyMultipart-> TC5



Howdy,
I don't have an immediate idea, which is worrisome (to me at least ;)).
Let's try to not put this oreilly jar in commons/lib, but instead in
WEB-INF/lib.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Dirk Griesbach [mailto:dgriesbach@eurocom-depora.de]
>Sent: Wednesday, December 03, 2003 9:44 AM
>To: Tomcat Users List
>Subject: Re: TC 4 <-oreillyMultipart-> TC5
>
>Hi Yoav,
>
>the 'full' error trace is:
>"
>java.lang.IllegalAccessError: tried to access method
>com.oreilly.servlet.multipart.Part.<init>(Ljava/lang/String;)V from
class
>com.oreilly.servlet.multipart.ParamPart
> at com.oreilly.servlet.multipart.ParamPart.<init>(ParamPart.java:42)
> at
>com.oreilly.servlet.multipart.MultipartParser.readNextPart(MultipartPar
ser.
>j
>ava:341)
>...< the calling servlet method >...
>"
>the source code mentioned reads:
>
>STARTSNIP of class ParamPart>>>>>>>>>>>>>>>>
>
>public class ParamPart extends Part {
>
>  /** contents of the parameter */
>  private byte[] value;
>  HashMap hashMap;
>  private String encoding;
>
>  /**
>   * Constructs a parameter part; this is called by the parser.
>   *
>   .......
>   */
>  ParamPart(HashMap hashMap, String name, ServletInputStream in,
>            String boundary, String encoding) throws IOException {
>    super(name);
<---------------------------------------------------
>start of error-trace
>    this.encoding = encoding;
>......
><<<<<<<<<<<<<<ENDSNIP class 'ParamPart'
>
>STARTSNIP of class 'Part' >>>>>>>>>>>>>>>>
>....
>public abstract class Part {
>  private String name;
>
>  /**
>   * Constructs an upload part with the given name.
>   */
>  Part(String name) {  <------------------------------ this constructor
>being called causes the error I think
>
>this.name = name;
>  }
>
>  /**
>   * Returns the name of the form element that this Part corresponds
to.
>   *
>   * @return the name of the form element that this Part corresponds
to.
>   */
>  public String getName() {
>    return name;
>  }
>.....
><<<<<<<<<<<<<< ENDSNIP class 'ParamPart'
>
>I have used TC 5 'as is' after standard installation; no changes to
>server.xml. Same web.xml.
>Same with TC4. The multipartlibrary both times (TC4 and TC5) being in
>"../common/lib"
>
>Same (web-)application, different results. Any ideas ?
>
>grisi
>
>----- Original Message -----
>From: Shapira, Yoav <Yo...@mpi.com>
>To: Tomcat Users List <to...@jakarta.apache.org>
>Sent: Wednesday, December 03, 2003 3:08 PM
>Subject: RE: TC 4 <-oreillyMultipart-> TC5
>
>
>
>Howdy,
>Class ParamPart is public and its constructor is public as well?
>Strange.  Are you running with different security settings?  Did you
put
>the library in a different place?
>
>Yoav Shapira
>Millennium ChemInformatics
>
>
>>-----Original Message-----
>>From: Dirk Griesbach [mailto:dgriesbach@eurocom-depora.de]
>>Sent: Wednesday, December 03, 2003 8:28 AM
>>To: Tomcat Users List
>>Subject: TC 4 <-oreillyMultipart-> TC5
>>
>>Hi folks,
>>I encountered a strange behaviour using 'oreilly's' multipartlibary
>(from
>>Nov,2002):
>>
>>It works fine on TC 4.1.27 but exactly the same servlet and library
>with TC
>>5.0.12 and 5.0.14
>>(just copied them) the error log reads:
>>
>>"java.lang.IllegalAccessError:
>>tried to access method
>>com.oreilly.servlet.multipart.Part.<init>(Ljava/lang/String;)V
>>from class com.oreilly.servlet.multipart.ParamPart
>>"
>>Class 'Part' IS public, so why this error on TC5 ? And no error on TC
4
>?
>>
>>Any suggestions ?
>>
>>greets
>>
>>grisi
>
>
>
>This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary
>and/or privileged.  This e-mail is intended only for the individual(s)
to
>whom it is addressed, and may not be saved, copied, printed, disclosed
or
>used by anyone else.  If you are not the(an) intended recipient, please
>immediately delete this e-mail from your computer system and notify the
>sender.  Thank you.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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



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