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

Camel Syslog Converter Not Selected Automatically

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 2.7.3, 2.8.0
    • None
    • None
    • Mac OS X 10.6.7, JDK 1.6, Maven 3.0.2, Camel 2.7.1

    • Patch Available

    Description

      When creating a route that sends text data from a file to the Camel Syslog unmarshal data format, the following error is returned.
      Looking at the org.apache.camel.component.syslog.Rfc3164SyslogConverter reveals that the @Converter annotation is missing at the class level.
      The attached test case illustrates the problem. With modifications to the pom.xml to point to the modified version of the camel-syslog the test works. See the comment: CHANGE TO POINT TO MODIFIED CAMEL-SYSLOG

      org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.lang.String to the required type: org.apache.camel.component.syslog.SyslogMessage with value <165>Aug 4 05:34:00 mymachine myproc[10]: %% It's\n time to make the do-nuts. %% Ingredients: Mix=OK, Jelly=OK #\n Devices: Mixer=OK, Jelly_Injector=OK, Frier=OK # Transport:\n Conveyer1=OK, Conveyer2=OK # %%

      at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:143)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.util.ExchangeHelper.convertToMandatoryType(ExchangeHelper.java:142)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.component.syslog.Rfc3164SyslogDataFormat.marshal(Rfc3164SyslogDataFormat.java:29)[camel-syslog-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:57)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:299)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:269)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:125)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:109)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:77)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:330)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:157)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:121)[camel-core-2.7.1.jar:2.7.1]
      at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:97)[camel-core-2.7.1.jar:2.7.1]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[:1.6.0_24]
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[:1.6.0_24]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[:1.6.0_24]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[:1.6.0_24]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[:1.6.0_24]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_24]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_24]
      at java.lang.Thread.run(Thread.java:680)[:1.6.0_24]

      Attachments

        1. camel-syslog.patch
          0.6 kB
          Roberto Rojas
        2. camel-syslog-test.tar.gz
          21 kB
          Roberto Rojas

        Activity

          People

            hadrian Hadrian Zbarcea
            rrojas-chariot Roberto Rojas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: