Re: Loss of body POST request...

2009-09-15 Thread Pid

On 15/09/2009 15:16, Eugene wrote:

I put testcase, which has everything to reproduce the problemI put testcase, 
which has everything to reproduce the problem.


Is this stacktrace the same one as the problem you originally reported?

What happens if you comment out this line in your test servlet?

->  Enumeration < ? > headers = req.getHeaderNames();

p






-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread Eugene
I have stacketrace for xmlrpc versions:
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown 
Source)
at 
org.apache.xmlrpc.server.XmlRpcStreamServer.getRequest(XmlRpcStreamServer.java:65)
at 
org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:199)
at 
org.apache.xmlrpc.webserver.XmlRpcServletServer.execute(XmlRpcServletServer.java:112)
at 
org.apache.xmlrpc.webserver.XmlRpcServlet.doPost(XmlRpcServlet.java:196)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)



Just do not say that this is a mistake to xmlrpc. 
Comes empty stream.

-- 
Best Regards, Eugene Batogov
___


Re: Loss of body POST request...

2009-09-15 Thread Pid

On 15/09/2009 14:25, Eugene wrote:

  I use POST URI.


With what, some code you wrote?


Headers remain constant.
And header receive normal, but body loss?!?!?
error trace:


This isn't the whole of the stacktrace, so I can't tell what it means.
What about the lines immediately before this?


   at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
 at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
 at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
 at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
 at java.lang.Thread.run(Thread.java:619)


Аnd see bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=47797

It is a dump of the request and response: 
https://issues.apache.org/bugzilla/attachment.cgi?id=24223


Your bug report isn't promising...

p

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread Eugene
I use Oracle JRockit JVM
-- 
Best Regards, Eugene Batogov
___

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread Eugene
 I use POST URI.


Headers remain constant.
And header receive normal, but body loss?!?!?
error trace:
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at 
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at 
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:619)


Аnd see bug: https://issues.apache.org/bugzilla/show_bug.cgi?id=47797


It is a dump of the request and response: 
https://issues.apache.org/bugzilla/attachment.cgi?id=24223


-- 
Best Regards, Eugene Batogov
___


Re: Loss of body POST request...

2009-09-15 Thread Pid

On 15/09/2009 11:30, Eugene wrote:

Hello. My next trouble.
Periodically, the body disappears POST-request with the same query!
I wrote a test client. It httpClient sends a test request, and on the server 
side, the servlet it takes. And trying to read.
Sometimes there is a situation that the titles are coming, but the body is 
absent.
That is, when reading req.getInputStream (). Read (...) we obtain -1.
This error appears periodically. Tested on JBoss-4.2.2.GA with Tomcat 5.5.X.
Please, help me!


You could start to log all of the request headers and try to find out 
what the difference is between when it works and when it doesn't.


Are there any conditions in your application that can cause 
getParameter() to be called before you call getInputStream()?



p







-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread Tommy Pham
- Original Message 
> From: David Smith 
> To: Tomcat Users List 
> Sent: Tuesday, September 15, 2009 5:35:07 AM
> Subject: Re: Loss of body POST request...
> 
> Servlets handle uri encoded POSTs just fine.  It's when the POST body is
> encoded differently like with mulipart -- that's where tools like
> fileupload come into the picture.  Either way, the POST body should be
> completely available to the servlet, even if it's just as an input stream. 
> 
> Were there any exceptions in the logs for broken pipes or similar stuff
> that might shed some light on the issue?
> 
> --David
> 

Eugene,

Is the POST URI or multipart encoded?  You didn't mention it and I forgot to 
ask you.

Regards,
Tommy

> Tommy Pham wrote:
> > - Original Message 
> >  
> >> From: Eugene 
> >> To: Tomcat Users List 
> >> Sent: Tuesday, September 15, 2009 4:16:43 AM
> >> Subject: Re: Loss of body POST request...
> >>
> >>
> >>
> >> What has FileUpload, if the request body is lost! 
> >> I want to know why, in principle it may be lost?
> >>
> >> -- 
> >> Best Regards, Eugene Batogov
> >> ___
> >>
> >
> > From my readings, I remember that the servlet doesn't handle POST by 
> > default.  
> So you have to implement your own.  I've looked into options available and 
> the 
> best I could find, IMHO,  and others have suggested is Commons FileUpload.  
> It 
> will handle all POST multipart, including the file upload.  Look into the 
> Streams API.
> >
> > Regards,
> > Tommy
> >
> >  
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread David Smith
Servlets handle uri encoded POSTs just fine.  It's when the POST body is
encoded differently like with mulipart -- that's where tools like
fileupload come into the picture.  Either way, the POST body should be
completely available to the servlet, even if it's just as an input stream. 

Were there any exceptions in the logs for broken pipes or similar stuff
that might shed some light on the issue?

--David

Tommy Pham wrote:
> - Original Message 
>   
>> From: Eugene 
>> To: Tomcat Users List 
>> Sent: Tuesday, September 15, 2009 4:16:43 AM
>> Subject: Re: Loss of body POST request...
>>
>>
>>
>> What has FileUpload, if the request body is lost! 
>> I want to know why, in principle it may be lost?
>>
>> -- 
>> Best Regards, Eugene Batogov
>> ___
>> 
>
> From my readings, I remember that the servlet doesn't handle POST by default. 
>  So you have to implement your own.  I've looked into options available and 
> the best I could find, IMHO,  and others have suggested is Commons 
> FileUpload.  It will handle all POST multipart, including the file upload.  
> Look into the Streams API.
>
> Regards,
> Tommy
>
>   

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread Tommy Pham
- Original Message 
> From: Eugene 
> To: Tomcat Users List 
> Sent: Tuesday, September 15, 2009 4:16:43 AM
> Subject: Re: Loss of body POST request...
> 
> 
> 
> What has FileUpload, if the request body is lost! 
> I want to know why, in principle it may be lost?
> 
> -- 
> Best Regards, Eugene Batogov
> ___

>From my readings, I remember that the servlet doesn't handle POST by default.  
>So you have to implement your own.  I've looked into options available and the 
>best I could find, IMHO,  and others have suggested is Commons FileUpload.  It 
>will handle all POST multipart, including the file upload.  Look into the 
>Streams API.

Regards,
Tommy


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Loss of body POST request...

2009-09-15 Thread Eugene


What has FileUpload, if the request body is lost! 
I want to know why, in principle it may be lost?

-- 
Best Regards, Eugene Batogov
___


Re: Loss of body POST request...

2009-09-15 Thread Tommy Pham
 Original Message 
> From: Eugene 
> To: users@tomcat.apache.org
> Sent: Tuesday, September 15, 2009 3:30:02 AM
> Subject: Loss of body POST request...
> 
> Hello. My next trouble. 
> Periodically, the body disappears POST-request with the same query! 
> I wrote a test client. It httpClient sends a test request, and on the server 
> side, the servlet it takes. And trying to read.
> Sometimes there is a situation that the titles are coming, but the body is 
> absent. 
> That is, when reading req.getInputStream (). Read (...) we obtain -1. 
> This error appears periodically. Tested on JBoss-4.2.2.GA with Tomcat 5.5.X. 
> Please, help me! 
> 
> -- 
> Best Regards, Eugene Batogov

Time to implement Commons' FileUpload?

Regards,
Tommy

> ___
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org