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

Steve Huston commented on CAMEL-2762:
-------------------------------------

I notice that this problem exists in Camel 2.19.1.

I can try it on 2.22 sometime soon, but if you already know it didn't change 
between 2.19 and 2.22 that wold be helpful.

> Default Tracer configuration eats Mina ByteBuffer responses
> -----------------------------------------------------------
>
>                 Key: CAMEL-2762
>                 URL: https://issues.apache.org/jira/browse/CAMEL-2762
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mina
>    Affects Versions: 2.2.0
>            Reporter: Cott Lang
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 2.4.0
>
>
> It appears that the only way to get UDP responses out of Camel Mina without 
> binary ( > 7 bit) getting garbled by internal conversions is to reply with a 
> Mina ByteBuffer.
> Unfortunately, if you have Trace on, the DefaultTraceFormatter ends up 
> calling MinaConverter.toByteArray, which "consumes" the ByteBuffer, setting 
> it to empty, which means no reply goes out. :)
> {code}
> 27/05/10 07:02:41:DEBUG:org.apache.camel.component.mina.MinaConsumer:Writing 
> body: DirectBuffer[pos=11 lim=11 cap=16: empty]
> {code}
> I'm not sure how to fix this one cleanly, so I don't have a patch.  I might 
> also be doing something wrong, if so I'm all ears. :)
> Here's a trace:
> {code}
>         at 
> org.apache.camel.component.mina.MinaConverter.toByteArray(MinaConverter.java:44)
>         at 
> org.apache.camel.component.mina.MinaConverter.toString(MinaConverter.java:49)
>         at sun.reflect.GeneratedMethodAccessor228.invoke(Unknown Source:-1)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at 
> org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:736)
>         at 
> org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:50)
>         at 
> org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:159)
>         at 
> org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:85)
>         at 
> org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:74)
>         at 
> org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:48)
>         at 
> org.apache.camel.util.MessageHelper.extractBodyAsString(MessageHelper.java:63)
>         at 
> org.apache.camel.processor.interceptor.DefaultTraceFormatter.format(DefaultTraceFormatter.java:75)
>         at 
> org.apache.camel.processor.interceptor.TraceInterceptor.format(TraceInterceptor.java:231)
> {code}
> Thanks!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to