You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by peter ellis <pe...@googlemail.com> on 2007/01/12 13:39:54 UTC

Buffer Overflow Error when getting a large (string) object back from the mina server when using TextLineCodecFactory

Guys

I have been successful in sending short string messages to my xml
server (which is built on top of mina) however when my application
first starts up (to connect to my server etc) the server returns the
status of all the office phones this results in the return of quite a
large string :-( and i get the following error...


4ip>
12-Jan-2007 12:33:51 [AnonymousIoService-7]
com.myserver.client.xml.XMLProxyProtocolHandler.exceptionCaught() -
Exception caught by proxy:
12-Jan-2007 12:33:51 [AnonymousIoService-7]
com.myserver.client.xml.XMLProxyProtocolHandler.exceptionCaught() -
Exception type =
org.apache.mina.filter.codec.ProtocolDecoderException, message =
org.apache.mina.common.BufferDataException: Line is too long: 7230
(Hexdump: empty)
org.apache.mina.filter.codec.ProtocolDecoderException:
org.apache.mina.common.BufferDataException: Line is too long: 7230
(Hexdump: empty)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:168)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54)


--------------------------------------------------------------

note that I am using the following protocol on both my proxy for the
client and xmlserver.....

cfg.getFilterChain().addLast(
                                            "codec",
                                            new ProtocolCodecFilter(
new TextLineCodecFactory() ) );




I am assuming that this buffer overflow is simply that this protocol
has a limit therefore is there a work around for this or do i need to
use another protocol????


-- 
Peter Ellis

Re: Buffer Overflow Error when getting a large (string) object back from the mina server when using TextLineCodecFactory

Posted by peter ellis <pe...@googlemail.com>.
you were right (spot on) cheers :-)


On 1/12/07, Paul Mallach <pm...@ariva.de> wrote:
> Hi!
>
> > I have been successful in sending short string messages to my xml
> > server (which is built on top of mina) however when my application
> > first starts up (to connect to my server etc) the server returns the
> > status of all the office phones this results in the return of quite a
> > large string :-( and i get the following error...
> >>
> > cfg.getFilterChain().addLast(
> >                                             "codec",
> >                                             new ProtocolCodecFilter(
> > new TextLineCodecFactory() ) );
> The TextLineDecoder has a default maximum line length of 1024 bytes. You can
> use TextLineCodecFactory.setDecoderMaxLineLength() to allow larger messages.
>
> bye; Paul.
>
>
> --
> ARIVA.DE AG, Paul Mallach, Produktentwicklung
> Walkerdamm 17, 24103 Kiel
> Tel.: +(49) 0431/97108-23, Fax: +(49) 0431/97108-29
> E-Mail: pm@ariva.de, Web: www.ariva.de
>


-- 
Peter Ellis
Java Developer

Re: Buffer Overflow Error when getting a large (string) object back from the mina server when using TextLineCodecFactory

Posted by Paul Mallach <pm...@ariva.de>.
Hi!

> I have been successful in sending short string messages to my xml
> server (which is built on top of mina) however when my application
> first starts up (to connect to my server etc) the server returns the
> status of all the office phones this results in the return of quite a
> large string :-( and i get the following error...
>>
> cfg.getFilterChain().addLast(
>                                             "codec",
>                                             new ProtocolCodecFilter(
> new TextLineCodecFactory() ) );
The TextLineDecoder has a default maximum line length of 1024 bytes. You can 
use TextLineCodecFactory.setDecoderMaxLineLength() to allow larger messages.

bye; Paul.


-- 
ARIVA.DE AG, Paul Mallach, Produktentwicklung
Walkerdamm 17, 24103 Kiel
Tel.: +(49) 0431/97108-23, Fax: +(49) 0431/97108-29
E-Mail: pm@ariva.de, Web: www.ariva.de