Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-12573

ClassCastException thrown KafkaSpanDecorator

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      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 

      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]
      
       

        Attachments

          Activity

            People

            • Assignee:
              acosentino Andrea Cosentino
              Reporter:
              akhettar ayache khettar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: