You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Andreas Hartmann <an...@apache.org> on 2005/11/15 10:39:33 UTC

MultipartParser.java:132: Malformed stream

Hi Cocoon devs,

we're experiencing a file upload problem which occurs occasionally:

1581402 2005-11-14 18:14:48,082 [TP-Processor6] ERROR 
access.service():1035  -
Problem with Cocoon servlet
org.apache.cocoon.servlet.multipart.MultipartException: Malformed stream
at org.apache.cocoon.servlet.multipart.MultipartParser.parseMultiPart
(MultipartParser.java:132)
at org.apache.cocoon.servlet.multipart.MultipartParser.getParts 
(MultipartParser.java:101)
...

The code snippet in question is:

         while (ts.getState() == TokenStream.STATE_NEXTPART) {
             ts.nextPart();
             parsePart(ts);
         }

         if (ts.getState() != TokenStream.STATE_ENDMULTIPART) {
             // sanity check
[*]         throw new MultipartException("Malformed stream");
         }



Setup:

- httpd as proxy
- Tomcat 5.5.9
- Cocoon 2.1.7

Is this a known issue?
Google pointed me to

http://mail-archives.apache.org/mod_mbox/cocoon-dev/200411.mbox/%3Ccm85jo$pus$1@sea.gmane.org%3E

Maybe this is the same problem?

Thanks in advance!
Andreas


Re: MultipartParser.java:132: Malformed stream

Posted by Andreas Hartmann <an...@apache.org>.
BURGHARD Éric wrote:
> Grzegorz Tañczyk wrote:
> 
> 
>>Hello Andreas,
>>
>>  If You are using Tomcat then try to set up timeouts(connection,
>>  read, upload and others if there are any) in server.xml.
>>
> 
> 
> I've experienced the same kind of bugs which only seems to occur with a
> httpd + tomcat configuration.
> 
> I've switch from mod_jk2 (deprecated) to mod_jk without better results (but
> now the configs are easily understandable). Things seems to go right since
> i've put a
> 
> JkOptions       +ForwardURICompatUnparsed

Grzegorz and Éric,

thanks for your answers. I'll try them and report my experiences.

-- Andreas


Re: MultipartParser.java:132: Malformed stream

Posted by BURGHARD Éric <eb...@free.fr>.
Grzegorz Tañczyk wrote:

> Hello Andreas,
> 
>   If You are using Tomcat then try to set up timeouts(connection,
>   read, upload and others if there are any) in server.xml.
> 

I've experienced the same kind of bugs which only seems to occur with a
httpd + tomcat configuration.

I've switch from mod_jk2 (deprecated) to mod_jk without better results (but
now the configs are easily understandable). Things seems to go right since
i've put a

JkOptions       +ForwardURICompatUnparsed

Hope it helps.

Regards.


Re: MultipartParser.java:132: Malformed stream

Posted by Grzegorz Tañczyk <go...@polzone.pl>.
Hello Andreas,

  If You are using Tomcat then try to set up timeouts(connection,
  read, upload and others if there are any) in server.xml.

Tuesday, November 15, 2005, 10:39:33 AM, you wrote:

AH> Hi Cocoon devs,

AH> we're experiencing a file upload problem which occurs occasionally:

AH> 1581402 2005-11-14 18:14:48,082 [TP-Processor6] ERROR 
AH> access.service():1035  -
AH> Problem with Cocoon servlet
AH> org.apache.cocoon.servlet.multipart.MultipartException: Malformed stream
AH> at
AH> org.apache.cocoon.servlet.multipart.MultipartParser.parseMultiPart
AH> (MultipartParser.java:132)
AH> at org.apache.cocoon.servlet.multipart.MultipartParser.getParts 
AH> (MultipartParser.java:101)
AH> ...

AH> The code snippet in question is:

AH>          while (ts.getState() == TokenStream.STATE_NEXTPART) {
AH>              ts.nextPart();
AH>              parsePart(ts);
AH>          }

AH>          if (ts.getState() != TokenStream.STATE_ENDMULTIPART) {
AH>              // sanity check
AH> [*]         throw new MultipartException("Malformed stream");
AH>          }



AH> Setup:

AH> - httpd as proxy
AH> - Tomcat 5.5.9
AH> - Cocoon 2.1.7

AH> Is this a known issue?
AH> Google pointed me to

AH> http://mail-archives.apache.org/mod_mbox/cocoon-dev/200411.mbox/%3Ccm85jo$pus$1@sea.gmane.org%3E

AH> Maybe this is the same problem?

AH> Thanks in advance!
AH> Andreas



-- 
Best regards,
 Grzegorz                            mailto:goliatus@polzone.pl