[ 
https://issues.apache.org/activemq/browse/CAMEL-1610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51668#action_51668
 ] 

Claus Ibsen commented on CAMEL-1610:
------------------------------------

It should be & to separate the URI parameters. You have 2 times ?

> unexpected mina exception with tcp and sync=false
> -------------------------------------------------
>
>                 Key: CAMEL-1610
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1610
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mina
>    Affects Versions: 1.6.0
>         Environment: camel-core-1.6.0, camel-mina-1.6.0, mina-core-1.1.7
>            Reporter: Ethan Aubin
>
> Hi,
> I've a client that should connect to mina and will push over messages and 
> excepts no response.  I think I should be using something like the following 
> unit test which fails raising an exception (stacktrace at end of bug report). 
> I'm not clear if this is a mina or camel problem.
>     public void testTcpReceipt() throws Exception {
>         CamelContext context = new DefaultCamelContext();
>         
>         final Endpoint inEndpoint = 
> context.getEndpoint("mina:tcp://127.0.0.1:15001?sync=false");
>         context.addRoutes(
>             new RouteBuilder() {
>                 @Override
>                 public void configure() {
>                     from(inEndpoint).
>                     process(new Processor() {
>                         public void process(Exchange exchange) throws 
> Exception {
>                             System.out.println("exchange.getOut().getBody(): 
> " + exchange.getOut().getBody());                            
>                         }
>                     }).
>                     to("log:loggingCategoryFoo?level=INFO");
>                 }
>             });
>         context.start();    
>         
>         Socket socket = new Socket();
>         socket.connect(new InetSocketAddress("127.0.0.1", 15001));
>         PrintWriter writer = new PrintWriter(socket.getOutputStream());
>         writer.write("Hello\nApache\nCamel\n");
>         writer.flush();
>         Thread.sleep(1000);
>         socket.close();
>         context.stop();
>     }
> 38 [AnonymousIoService-2] WARN 
> org.apache.camel.component.mina.MinaConsumer$ReceiveHandler - 
> [/127.0.0.1:51182] Unexpected exception from exceptionCaught handler.
> org.apache.camel.CamelException: 
> org.apache.mina.filter.codec.ProtocolDecoderException: 
> org.apache.mina.common.BufferDataException: dataLength: 1214606444 (Hexdump: 
> 48 65 6C 6C 6F 0A 41 70 61 63 68 65 0A 43 61 6D 65 6C 0A)
>       at 
> org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.exceptionCaught(MinaConsumer.java:88)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.exceptionCaught(AbstractIoFilterChain.java:564)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
>       at 
> org.apache.mina.common.IoFilterAdapter.exceptionCaught(IoFilterAdapter.java:75)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.callNextExceptionCaught(AbstractIoFilterChain.java:345)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.access$1000(AbstractIoFilterChain.java:53)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.exceptionCaught(AbstractIoFilterChain.java:643)
>       at 
> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:224)
>       at 
> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>       at 
> org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
>       at java.lang.Thread.run(Thread.java:637)
> Caused by: org.apache.mina.filter.codec.ProtocolDecoderException: 
> org.apache.mina.common.BufferDataException: dataLength: 1214606444 (Hexdump: 
> 48 65 6C 6C 6F 0A 41 70 61 63 68 65 0A 43 61 6D 65 6C 0A)
>       at 
> org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:165)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
>       at 
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
>       at 
> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
>       ... 5 more
> Caused by: org.apache.mina.common.BufferDataException: dataLength: 1214606444
>       at 
> org.apache.mina.common.ByteBuffer.prefixedDataAvailable(ByteBuffer.java:1631)
>       at 
> org.apache.mina.filter.codec.serialization.ObjectSerializationDecoder.doDecode(ObjectSerializationDecoder.java:88)
>       at 
> org.apache.mina.filter.codec.CumulativeProtocolDecoder.decode(CumulativeProtocolDecoder.java:133)
>       at 
> org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:158)
>       ... 9 more
> May 13, 2009 10:15:13 AM org.apache.camel.component.mina.MinaConsumer doStop

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to