You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by da...@gmx.net on 2006/12/04 17:01:52 UTC
deserialize bigger objects with ObjectInputstream on the client failed
hi all,
I try to deserialize an Objectstream at the client.
Smaller Objects working fine, but bigger Objects
let the client abort the connection with the
following exception messsage :
// first there come some data like the first line
// and than the stream corrupt by something
[0x1][0xf]M[0xdb][0xae][0xe0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0][0x0]t[0x0][0x5]test4t[0x0].\folder1\file\test12\test10\test9\test7\test4\sq[0x0]~"
java.io.StreamCorruptedException
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1301)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at java.util.ArrayList.readObject(ArrayList.java:554)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(1) I serialize the data to a file, copy manual and deserialze,
everything was fine.
(2) The data is a kind of directory list in an Object.
I copied the directories that worked fine to subdirectories
to create a bigger objects with the same chars.
The stream with the bigger objects failed during the transfer.
It must have something to do with the size of the Object I want to
deserialize.
Maybe someone has a hint why the transfer occurs after a while?
thanks,
bastian
--
"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
Re: Re: deserialize bigger objects with ObjectInputstream on the
client failed
Posted by da...@gmx.net.
Thanks a lot for your help, the problem is solved.
There were new wrong libaries at the tomcat
that caused the problem.
bastian
----
-------- Original-Nachricht --------
Datum: Mon, 04 Dec 2006 17:15:22 +0100
Von: Roland Weber <ht...@dubioso.net>
An: HttpClient User Discussion <ht...@jakarta.apache.org>
Betreff: Re: deserialize bigger objects with ObjectInputstream on the client failed
> Hello Bastian,
>
> the HTTP protocol has no known problems with larger files
> (less than 2 GB), nor has HttpClient. Please try to narrow
> down the problem to see whether it is on the transport layer
> or above.
> - check whether the server sends a Content-Encoding header
> - generate a binary file on the server
> - deserialize the file on the client to verify it's consistency
> and the client environment (that's what you've done)
> - let the client read the data from the server and, instead
> of deserializing it, write it to a file
> - compare the file downloaded by the client with the one
> generated by the server
>
> We need more information to help you. The exception is of
> no use at all, it only tells us that an object can't be
> deserialized. It doesn't tell us where the problem comes
> from, and it is in no way related to HttpClient.
>
> cheers,
> Roland
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
Re: deserialize bigger objects with ObjectInputstream on the client
failed
Posted by Roland Weber <ht...@dubioso.net>.
Hello Bastian,
the HTTP protocol has no known problems with larger files
(less than 2 GB), nor has HttpClient. Please try to narrow
down the problem to see whether it is on the transport layer
or above.
- check whether the server sends a Content-Encoding header
- generate a binary file on the server
- deserialize the file on the client to verify it's consistency
and the client environment (that's what you've done)
- let the client read the data from the server and, instead
of deserializing it, write it to a file
- compare the file downloaded by the client with the one
generated by the server
We need more information to help you. The exception is of
no use at all, it only tells us that an object can't be
deserialized. It doesn't tell us where the problem comes
from, and it is in no way related to HttpClient.
cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org