mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: Help, Mina do not send message to Flex client
Date Wed, 22 Jul 2009 11:52:32 GMT
hexiaofeng wrote:
> hi all
> But it seems some exception print when session send message to Flex.
> 2009-7-22 18:40:49 test.ServerChatProtocolHandler exceptionCaught
> 警告: Unexpected exception.
> java.lang.IllegalStateException: Don't know how to handle message of type 'java.lang.String'.
 Are you missing a protocol encoder?
So, the question is : Are you missing a protocol encoder ? Obviously, yes.

> How to fix it? thank you very much
Add a protocolEncoder in your chain :

chain.addLast("codec", new ProtocolCodecFilter(
new TextLineCodecFactory()));

MINA needs to know how to convert a String to a IoBuffer.

cordialement, regards,
Emmanuel Lécharny

View raw message