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

ayache khettar updated CAMEL-12573:
-----------------------------------
    Description: 
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 for it and here is a pull request 
for it: https://github.com/apache/camel/pull/2372 
{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:java}
 {code}

  was:
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}


> 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 for it and here is a pull 
> request for it: https://github.com/apache/camel/pull/2372 
> {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:java}
>  {code}



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

Reply via email to