From the stack trace, it looks like the decoder cannot interpret the data 
length rightly.
Can you double check it with your application?


--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) 
(English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Wednesday, August 21, 2013 at 12:55 AM, milltj wrote:

> I am currently using Mina2 V2.11.1.
>  
> My decoder looks like....
>  
> @Override
> protected boolean doDecode(IoSession is, IoBuffer ib,
> ProtocolDecoderOutput pdo) throws Exception {
> int headerSize=28;
> byte[] header = new byte[headerSize];
> byte[] xmlBuffer = null;
> byte[] fullMessage = null;
>  
> int xmlLength = -1;
> ib.get(header);
>  
> xmlLength = convertBytesToInt(Arrays.copyOfRange(header, 16, 20));
>  
> xmlBuffer = new byte[xmlLength];
> ib.get(xmlBuffer);
>  
> pdo.write(xmlc.convertXmlToObject(xmlBuffer));
>  
> return true;
>  
> }
>  
> I am finding that I get that error message no matter what options I add to
> the url. I discovered that my clients have a number of different requests
> that will be sent, some require a response, others do not. When I don't
> return a response it closes the connection, which I do not want, I want the
> connection to remain open at all times. So I tried to set the url to
>  
>  
> <camel:from
> uri="mina2:tcp://10.5.60.60:9000?disconnectOnNoReply=false;codec=#gilbarcoDecoder"
> />
>  
> But I still get the same error.
> Error:  
> org.apache.mina.filter.codec.ProtocolDecoderException:  
> org.apache.mina.core.buffer.BufferDataException: dataLength: 1347375948  
>  
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Mina-Synchronous-Communication-tp5737223p5737612.html
> Sent from the Camel - Users mailing list archive at Nabble.com 
> (http://Nabble.com).



Reply via email to