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

Configuring any Byte type header via Spring XML constant would throw java.lang.ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 2.7.3, 2.8.0
    • camel-smpp
    • None
    • Patch Available

    Description

      Configuring any Byte type header via Spring XML constant would throw java.lang.ClassCastException

      <camel:setHeader headerName="CamelSmppDestAddrTon">
        <camel:constant>0</camel:constant>
      </camel:setHeader>
      

      java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Byte
      at org.apache.camel.component.smpp.SmppBinding.createSubmitSm(SmppBinding.java:105)
      at org.apache.camel.component.smpp.SmppProducer.process(SmppProducer.java:128)
      at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
      at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)
      at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)
      at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
      at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
      at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:103)
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
      at org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.messageReceived(MinaConsumer.java:117)
      at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:570)
      at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:299)
      at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:53)
      at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:648)
      at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:220)
      at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:264)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:680)

      Attachments

        1. CAMEL-3909-patch.txt
          3 kB
          Ken Yu

        Activity

          People

            davsclaus Claus Ibsen
            acodapella Ken Yu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: