hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dasKlei...@gmx.net
Subject Re: problems to deserialize a stream on the client
Date Fri, 01 Dec 2006 11:42:13 GMT
Hello Roland,

There is no  java.io.EOFException anymore, I 
forgot to flush the stream at the server.

For a smaller Object everything is working fine now,
but with lager objects I got problems.

I wrote everything to a file and did not
deserialize it, but the same error ocurred.

I can see in the logs how the data "blocks"
will transfered, but after a while the
transfer break. At least before it stop it
shows the following logs:
---------------------------------------------------------------------
2006-12-01 12:03:50,952 DEBUG [AWT-EventQueue-0]
    org.apache.commons.httpclient.HttpMethodBase:
        Resorting to protocol version default close connection policy
2006-12-01 12:03:50,952 DEBUG [AWT-EventQueue-0]
    org.apache.commons.httpclient.HttpMethodBase: 
        Should NOT close connection, using HTTP/1.1
2006-12-01 12:03:50,952 DEBUG [AWT-EventQueue-0] 
    org.apache.commons.httpclient.HttpConnection:
        Releasing connection back to connection manager.
---------------------------------------------------------------------

Maybe the postMethod is not able to transfer huge data
without some special buffering that I forgot to implement?


The server shows the following exception in the log:
---------------------------------------------------------------------
ClientAbortException:  java.io.IOException 
    at org.apache.catalina.connector.OutputBuffer.realWriteBytes
        (OutputBuffer.java:366)
    at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:433)
    at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:348)
    at org.apache.catalina.connector.OutputBuffer.writeBytes
        (OutputBuffer.java:392)
    at org.apache.catalina.connector.OutputBuffer.write
        (OutputBuffer.java:381)
...
---------------------------------------------------------------------

Or maybe it is a server problem
---------------------------------------------------------------------
2006-12-01 12:03:50,945 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: << 
        "    The server is temporarily unable to service your[\n]"
2006-12-01 12:03:50,946 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: <<
        "    request due to maintenance downtime or capacity[\n]"
2006-12-01 12:03:50,946 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << 
        "    problems. Please try again later. [\n]"
---------------------------------------------------------------------


I add now some other log from the client,
thanks a lot for your help

bastian


http client log content and header 
(i am using http client release v3.0.1)
---------------------------------------------------------------------

2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "[0xf6][0xaa][0x1b]`[0x1][0x0][0x0][0x0][0x0][0x0][0x0][0x17]tt[0x0]
9005fb74e13b001b1b33b14fc2401a07t[0x0]{\test_lab\backup\_10_19\test_lab\.metadata\.plugins\org.eclipse.core.resources\.history\e2\9005fb74e13b001b1b33b14fc2401a07sq[0x0]~[0x0][0x5][0x0][0x0][0x1][0xe]`eN[0xf0][0x1][0x0][0x0][0x0][0x0][0x0][0x0][0x6]$t[0x0]
10b5c990675f001b1155a5be31a04b17t[0x0]{\test_lab\backup\_10_19\test_lab\.metadata\.plugins\org.eclipse.core.resources\.history\e2\10b5c990675f001b1155a5be31a04b17sq[0x0]~[0x0][0x5][0x0][0x0][0x1][0xe][E[0xb1][0x80][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0]t[0x0][0x2]5at[0x0][\test_lab\backup\_10_19\test_lab\.metadata\.plugins\org.eclipse."

2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: << "[\r]"
2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: << "[\n]"
2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: << "1"
2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "e"
2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: << "[\r]"
2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "[\n]"
2006-12-01 12:03:50,933 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "<?xml version="1.0" encoding=""
2006-12-01 12:03:50,934 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "[\r]"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "[\n]"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "a"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "f"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "[\r]"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "[\n]"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "ISO-8859-1"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << ""?>[\n]"
2006-12-01 12:03:50,935 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"[\n]"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[\n]"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "<html xmlns="http://www.w3.org/1999/xhtml" lang=""
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "[\r]"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "[\n]"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0]
    httpclient.wire.content: << "e"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "[\r]"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "[\n]"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0]
     httpclient.wire.content: << "en"
2006-12-01 12:03:50,936 DEBUG [AWT-EventQueue-0] 
    httpclient.wire.content: << "" xml:lang=""
    
    HERE COMES THE SERVER ERROR PAGE
    AND THAN THE FIRST LOG FROM THIS
    MAIL
---------------------------------------------------------------------

> Hello Bastian,
> 
> > The same with a stream over the network failed.
> > Look like the first parts of the file will be
> > copied over but than the copy stops with the
> > following exception:
> > 
> > 
> > 2006-11-30 17:24:37,521 DEBUG [AWT-EventQueue-0]
> >    org.apache.commons.httpclient.HttpMethodBase:
> >        Resorting to protocol  version default close connection policy
> > 2006-11-30 17:24:37,521 DEBUG [AWT-EventQueue-0]
> >    org.apache.commons.httpclient.HttpMethodBase:
> >        Should NOT close connection, using HTTP/1.1
> > 2006-11-30 17:24:37,521 DEBUG [AWT-EventQueue-0]
> >      org.apache.commons.httpclient.HttpConnection:
> >          Releasing connection back to connection manager.
> > 
> > java.io.EOFException
> > 	at
> java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2435)
> > 	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1245)
> > 	at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
> > 	at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
> > 	at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
> 
> It's hard to tell whether this is a problem on the client or
> server side. You could please send a wire log for both header
> and content?
> http://jakarta.apache.org/commons/httpclient/logging.html
> 
> Have you tried receiving the data into a byte array instead
> of deserializing it immediately? Are there corresponding
> error messages on the server?
> 
> > I am using "application/octet-stream" is this ok?
> 
> I don't see anything wrong with this.
> 
> > Maybe something runs out of memory ?
> 
> That should generate a different kind of error.
> 
> cheers,
>   Roland
-- 
"Ein Herz für Kinder" - Ihre Spende hilft! Aktion: www.deutschlandsegelt.de
Unser Dankeschön: Ihr Name auf dem Segel der 1. deutschen America's Cup-Yacht!

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


Mime
View raw message