camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CAMEL-2762) Default Tracer configuration eats Mina ByteBuffer responses
Date Fri, 28 May 2010 07:39:52 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-2762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-2762.
--------------------------------

    Resolution: Fixed

trunk: 949124.

Cott can you test with latest code on your system?

> Default Tracer configuration eats Mina ByteBuffer responses
> -----------------------------------------------------------
>
>                 Key: CAMEL-2762
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2762
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mina
>    Affects Versions: 2.2.0
>            Reporter: Cott Lang
>            Assignee: Claus Ibsen
>             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 is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message