Hi,
i took the ChatServerSpring example and tried to implement server based on
this example.
But now i'm facing a:
org.apache.mina.filter.codec.RecoverableProtocolDecoderException: Line is
too long: 1123 (Hexdump: 32 31 39 .......................................
0A)
at
org.apache.mina.filter.codec.textline.TextLineDecoder.decodeAuto(TextLineDecoder.java:214)
My Response might be to long, so i tried to cut it into chunks.
@Override
public void messageReceived(IoSession session, Object message) {
LOGGER.info("messageReceived(session,message): " + message);
....
LOGGER.debug("response.length: " + response.length());
StringTokenizer tokenizer = new StringTokenizer(response,"\r\n");
LOGGER.debug("#tokens: "+ tokenizer.countTokens());
while(tokenizer.hasMoreTokens()) {
session.write(tokenizer.nextToken());
}
}
but i get still the same exception. The debug output is:
response.length: 17470
#tokens: 400
i compiled apache mina from the trunk, actually 2.0.0-M6-SNAPSHOT
Kind regards,
Ingo