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

ClosedByInterruptException in file endpoint when processing first message within aggregator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-M1
    • 1.6.1, 2.0-M2
    • camel-core
    • None
    • Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
      Mac OS Leopard

    Description

      A java.nio.channels.ClosedByInterruptException exception is encountered when processing the first message for a file endpoint and a file must be created.

      The exception occurs at the line of code labeled ** in the following FileOperations function:

      private FileChannel prepareOutputFileChannel(File target, FileChannel out) throws IOException {
      if (endpoint.isAppend())

      { out = new RandomAccessFile(target, "rw").getChannel(); out = out.position(out.size()); // ** Exception here }

      else

      { out = new FileOutputStream(target).getChannel(); }

      return out;
      }

      I ran the unit test org.apache.camel.component.file.NewFileProduceTest and it passes, so it seems to be something specific to how the route is configured, such as the use of the aggregator.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rsmith Ron Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: