[
https://issues.apache.org/jira/browse/CAMEL-12573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16509774#comment-16509774
]
ASF GitHub Bot commented on CAMEL-12573:
----------------------------------------
akhettar opened a new pull request #2372: CAMEL-12573: Fixing class cast
exception
URL: https://github.com/apache/camel/pull/2372
I have introduced a generic method which extracts the values of the
`Partition` and the `Offset` from the Exchange headers according to their
corresponding types.
Here is the Jira ticket for
it.https://issues.apache.org/jira/browse/CAMEL-12573
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> ClassCastException thrown KafkaSpanDecorator
> --------------------------------------------
>
> Key: CAMEL-12573
> URL: https://issues.apache.org/jira/browse/CAMEL-12573
> Project: Camel
> Issue Type: Bug
> Components: camel-opentracing
> Reporter: ayache khettar
> Priority: Major
>
> ClassCastException is thrown by `KafkaSpanDecorator` for the Partition and
> the Offset header values. The fix to this is to cast the partition to an
> Integer and the Offset to a Long. I have got a fix and I will raise a pull
> request shortly.
>
>
> {code:java}
> 2018-06-12 16:36:26.224 WARN 34820 --- [kaConsumer[ocr]]
> o.a.camel.opentracing.OpenTracingTracer : OpenTracing: Failed to capture
> tracing data
> java.lang.ClassCastException: java.lang.Integer cannot be cast to
> java.lang.String
> at
> org.apache.camel.opentracing.decorators.KafkaSpanDecorator.pre(KafkaSpanDecorator.java:61)
> ~[camel-opentracing-2.21.0.jar:2.21.0]
> at
> org.apache.camel.opentracing.OpenTracingTracer$OpenTracingRoutePolicy.onExchangeBegin(OpenTracingTracer.java:297)
> ~[camel-opentracing-2.21.0.jar:2.21.0]
> at
> org.apache.camel.processor.CamelInternalProcessor$RoutePolicyAdvice.before(CamelInternalProcessor.java:495)
> [camel-core-2.21.0.jar:2.21.0]
> at
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:149)
> [camel-core-2.21.0.jar:2.21.0]
> at
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97)
> [camel-core-2.21.0.jar:2.21.0]
> at
> org.apache.camel.component.kafka.KafkaConsumer$KafkaFetchRecords.doRun(KafkaConsumer.java:295)
> [camel-kafka-2.21.0.jar:2.21.0]
> at
> org.apache.camel.component.kafka.KafkaConsumer$KafkaFetchRecords.run(KafkaConsumer.java:187)
> [camel-kafka-2.21.0.jar:2.21.0]
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [na:1.8.0_151]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [na:1.8.0_151]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [na:1.8.0_151]
> at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
> {code}{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)