Return-Path: Delivered-To: apmail-mina-users-archive@www.apache.org Received: (qmail 4602 invoked from network); 22 Jul 2009 11:52:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jul 2009 11:52:00 -0000 Received: (qmail 94754 invoked by uid 500); 22 Jul 2009 11:53:04 -0000 Delivered-To: apmail-mina-users-archive@mina.apache.org Received: (qmail 94734 invoked by uid 500); 22 Jul 2009 11:53:04 -0000 Mailing-List: contact users-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@mina.apache.org Delivered-To: mailing list users@mina.apache.org Received: (qmail 94724 invoked by uid 99); 22 Jul 2009 11:53:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jul 2009 11:53:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 209.85.219.210 as permitted sender) Received: from [209.85.219.210] (HELO mail-ew0-f210.google.com) (209.85.219.210) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jul 2009 11:52:53 +0000 Received: by ewy6 with SMTP id 6so139705ewy.8 for ; Wed, 22 Jul 2009 04:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=fEqZj5GYgCWJ1x1P7zy0lgg4lsK/syp7OMkwM+IVUXM=; b=TMKoh/Y3GdonZNMFKnpO0dxX6NLJuKZkEQof5obKeY4qBu/B8a74T4FoBmShKJT0GK t91RQg1OnuCB9pK0fPNGhpnfcQrc9V0URsnyBslLh5PYZsGEIft0MiepthBmJwfSLNLA yMQ0GQEgI2y9OC9QIyUL1DuR8J5JZ6CdoP3P8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=w+e3dobJZh2K7JEpO+wM/+pzWqn4CB1F+QIh5GyjdOk0IlkwlvlMioyPNicI68XOIe QgZw/s5CljMQrHba6SU5DX1Vc1i7Fug0TuYynto72WMJipG8pw/8bqB067KP14FWKOaB mftXc2nOVyxqTaBGmd95u+giNj+BIRqLhqbRo= Received: by 10.210.13.12 with SMTP id 12mr6510537ebm.63.1248263553255; Wed, 22 Jul 2009 04:52:33 -0700 (PDT) Received: from ?192.168.0.51? (lon92-10-78-226-4-211.fbx.proxad.net [78.226.4.211]) by mx.google.com with ESMTPS id 10sm1143864eyd.27.2009.07.22.04.52.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 22 Jul 2009 04:52:32 -0700 (PDT) Sender: Emmanuel Lecharny Message-ID: <4A66FD80.7060400@nextury.com> Date: Wed, 22 Jul 2009 13:52:32 +0200 From: Emmanuel Lecharny User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: users@mina.apache.org Subject: Re: Help, Mina do not send message to Flex client References: In-Reply-To: Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org hexiaofeng wrote: > hi all > But it seems some exception print when session send message to Flex. > Exact. > 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 www.iktek.com directory.apache.org