1

hi i am new to android i got the response from server using json.when i recieved the response it shows the error here

03-22 15:43:46.312: WARN/System.err(541): org.apache.mina.filter.codec.RecoverableProtocolDecoderException: Line is too long:

03-22 15:43:46.321: WARN/System.err(541): at org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:214)

03-22 15:43:46.321: WARN/System.err(541): at org.apache.mina.filter.codec.textline.TextLineDecoder.decode(TextLineDecoder.java:138)

03-22 15:43:46.321: WARN/System.err(541): at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:224)

03-22 15:43:46.321: WARN/System.err(541): at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:431)

tamil
  • 322
  • 2
  • 8
  • 21

1 Answers1

5

The line you are trying to decode is too long.

TextLineDecoder has a public method called setMaxLineLength which can be used to increase the allowable line length. The default is 1024.

http://mina.apache.org/report/trunk/apidocs/org/apache/mina/filter/codec/textline/TextLineDecoder.html#setMaxLineLength(int)

I'm not sure if you are calling TextLineDecoder explicitly in your code. Could you post your code or at least the full stack trace?

Brian Cooley
  • 11,622
  • 4
  • 40
  • 39