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

Camel ZipFile does cannot move file after succesful processing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Not A Problem
    • 2.18.3
    • None
    • camel-zipfile
    • None
    • Windows 7 x64

    • Unknown

    Description

      When creating a route as follows:

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camel="http://camel.apache.org/schema/spring"
        xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
        xsi:schemaLocation="
                http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
                http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd
                http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
                http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd">
      
        <bean id="zipFileDataFormat" class="org.apache.camel.dataformat.zipfile.ZipFileDataFormat">
          <property name="usingIterator" value="true" />
        </bean>
      
        <camelContext xmlns="http://camel.apache.org/schema/spring" streamCache="true">
          <route>
            <from uri="file:C:/camelTest/in" />
            <unmarshal ref="zipFileDataFormat" />
            <split streaming="true">
              <simple>${body}</simple>
              <log loggingLevel="INFO" message="$simple{header.zipFileName}" />
              <to uri="file:C:/camelTest/xml" />
            </split>
            <log loggingLevel="INFO" message="$simple{file:name} Succesful processed" />
          </route>
        </camelContext>
      </beans>
      

      the renaming of the file fails with

      Renaming file from 'C:\camelTest\in\20161201T0030Z_1D_BE00_EQ.zip' to 'C:\camelTest\in\.camel\20161201T0030Z_1D_BE00_EQ.zip' failed: Cannot delete file 'C:\camelTest\in\20161201T0030Z_1D_BE00_EQ.zip' after copy succeeded
      

      The file stays in input folder and gets processed over and over again.

      Attachments

        Issue Links

          Activity

            People

              onders Onder Sezgin
              thomasleber Thomas Leber
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: