Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7879

camel-hl7 example throws error when consuming file on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • fuse-7.2
    • fuse-7.0
    • Camel, Examples
    • None
    • % %
    • Fuse 7.2 Sprint 36

      building and installation is successful, but when I copy test file to 'work/camel-hl7/input' folder, the file is not consumed and processed, as it should
      part of the error:

      2018-03-21 11:47:20,103 | ERROR | ile://work/hl7/input | o.a.c.p.DefaultErrorHandler      | 59 - org.apache.camel.camel-core - 2.21.0.fuse-000055-redhat-2 | Failed delivery for (MessageId: ID-w2k16-x86-64-me-1521632833744-0-4 on ExchangeId: ID-w2k16-x86-64-me-1521632833744-0-3). Exhausted after delivery attempt: 1 caught: org.apache.camel.InvalidPayloadException: No body available of type: java.lang.String but has value: GenericFile[valid.hl7] of type: org.apache.camel.component.file.GenericFile on: valid.hl7. Caused by: Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is file based: GenericFile[valid.hl7]] due java.io.IOException: The process cannot access the file because another process has locked a portion of the file. Exchange[ID-w2k16-x86-64-me-1521632833744-0-3]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is file based: GenericFile[valid.hl7]] due java.io.IOException: The process cannot access the file because another process has locked a portion of the file]
      
      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId              ProcessorId          Processor                                                                        Elapsed (ms)
      [hl7FileRoute      ] [hl7FileRoute      ] [file://work/hl7/input?antInclude=*.hl7&delete=true&moveFailed=.error&readLock=] [         0]
      [hl7FileRoute      ] [convertBodyTo1    ] [convertBodyTo[java.lang.String]                                               ] [         0]
      
      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      org.apache.camel.InvalidPayloadException: No body available of type: java.lang.String but has value: GenericFile[valid.hl7] of type: org.apache.camel.component.file.GenericFile on: valid.hl7. Caused by: Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is file based: GenericFile[valid.hl7]] due java.io.IOException: The process cannot access the file because another process has locked a portion of the file. Exchange[ID-w2k16-x86-64-me-1521632833744-0-3]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is file based: GenericFile[valid.hl7]] due java.io.IOException: The process cannot access the file because another process has locked a portion of the file]
      	at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:117) ~[59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:100) ~[59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:452) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:219) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:183) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [59:org.apache.camel.camel-core:2.21.0.fuse-000055-redhat-2]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
      	at java.lang.Thread.run(Thread.java:748) [?:?]
      Caused by: org.apache.camel.TypeConversionException: Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is file based: GenericFile[valid.hl7]] due java.io.IOException: The process cannot access the file because another process has locked a portion of the file
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.createTypeConversionException(BaseTypeConverterRegistry.java:667) ~[?:?]
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:198) ~[?:?]
      	at org.apache.camel.core.osgi.OsgiTypeConverter.mandatoryConvertTo(OsgiTypeConverter.java:128) ~[?:?]
      	at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSuppo

        1. camel-core-2.21.0.fuse-000055.rename-to-jar
          4.57 MB
          John Poth
        2. fuse.log
          385 kB
          Jan Kasztura

              johnpoth John Poth
              jkasztur@redhat.com Jan Kasztura (Inactive)
              Jan Kasztura Jan Kasztura (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: