Makes sense, and setting the decoder to larger size is working, thanks a lot
for your help.  

I was wondering what is the effect (harm) of using the larger decoder size
(in cases one may not need the larger size).  Is it a safety measure or will
it definitely cause a larger buffer to get allocated.  I.e. trying to decide
if I should make the larger buffer size the default or ask downstream
clients to specifically tune it as per their specific needs.

Thanks again.
Parag


Maarten Bosteels-4 wrote:
> 
> Hi paragmehta,
> 
> I wasn't sure which ProtocolCodec you were using, but I guess you found
> the
> solution now, right ?
> 
> I guess the default maxObjectSize for encoding is much higher than the
> default for decoding because
> the risk of an OutOfMemory is a lot smaller: the objects being encoded
> come
> from the application, not from the network.
> 
> Maarten
> 
> 
> On 7/9/07, paragmehta <[EMAIL PROTECTED]> wrote:
>>
>>
>> I am using ObjectSerializationEncoder/Decoder.  I wonder if you mean the
>> solution is to
>> setDecoderMaxObjectSize(int maxObjectSize).  Seems there is no encoding
>> problem (perhaps since default is the much larger Integer.MAX...
>>
>> Thanks.
>>
>>
>> Maarten Bosteels-4 wrote:
>> >
>> > see here:
>> http://www.mail-archive.com/[email protected]/msg00645.html
>> >
>> > I hope that helps.
>> > Maarten
>> >
>> > On 7/9/07, paragmehta <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> Folks,
>> >>
>> >> Using MINA 1.0.2 or 1.1, if the dataset being serialized is large, I
>> get
>> >> the
>> >> following error, any suggestions would be welcome.  Does not happen
>> for
>> >> smaller amount of data.
>> >>
>> >> Thanks.
>> >> Parag
>> >>
>> >> 2007-07-09 14:19:17,816 [AnonymousIoService-2] INFO
>> >> com......client.MINAClient$Handler  - [localhost/127.0.0.1:41030]
>> >> EXCEPTION:
>> >> org.apache.mina.filter.codec.ProtocolDecoderException:
>> >> org.apache.mina.common.BufferDataException: dataLength: 2482723
>> (Hexdump:
>> >> 00
>> >> 25 E2 23 AC ED 00 05 73 72 00 2B 63 6F 6D 2E 75 62 73 2E 66 69 72 63
>> 2E
>> >> 63
>> >> 6F 6D 6D 6F 6E 2E 73 65 72 76 69 63 65 2E 44 65 66 61 75 6C 74 52 65
>> 73
>> >> 70
>> >> 6F 6E 73 65 78 70 70 75 72 00 ....
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Protocol-Decoder-Exception---large-data-set---BufferDataException-tf4051131.html#a11507261
>> >> Sent from the mina dev mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Protocol-Decoder-Exception---large-data-set---BufferDataException-tf4051131.html#a11508054
>> Sent from the mina dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Protocol-Decoder-Exception---large-data-set---BufferDataException-tf4051131.html#a11508900
Sent from the mina dev mailing list archive at Nabble.com.

Reply via email to