You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Ron Smith (JIRA)" <ji...@apache.org> on 2009/05/09 21:16:50 UTC

[jira] Created: (CAMEL-1595) ClosedByInterruptException in file endpoint when processing first message within aggregator

ClosedByInterruptException in file endpoint when processing first message within aggregator
-------------------------------------------------------------------------------------------

                 Key: CAMEL-1595
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1595
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 2.0-M1
         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Mac OS Leopard
            Reporter: Ron Smith


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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1595) ClosedByInterruptException in file endpoint when processing first message within aggregator

Posted by "Ron Smith (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51609#action_51609 ] 

Ron Smith commented on CAMEL-1595:
----------------------------------

Tested with 2.0 SNAPSHOT in maven repo and it seems to be working fine.
thanks!

> ClosedByInterruptException in file endpoint when processing first message within aggregator
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1595
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1595
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M1
>         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
> Mac OS Leopard
>            Reporter: Ron Smith
>         Attachments: git_camel_problem_demo.tar.gz
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1595) ClosedByInterruptException in file endpoint when processing first message within aggregator

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1595.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0-M2
                   1.6.1

Already fixed as by Martins instructions.

> ClosedByInterruptException in file endpoint when processing first message within aggregator
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1595
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1595
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M1
>         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
> Mac OS Leopard
>            Reporter: Ron Smith
>             Fix For: 1.6.1, 2.0-M2
>
>         Attachments: git_camel_problem_demo.tar.gz
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1595) ClosedByInterruptException in file endpoint when processing first message within aggregator

Posted by "Martin Krasser (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=51601#action_51601 ] 

Martin Krasser commented on CAMEL-1595:
---------------------------------------

Hi Ron,

that's likely related to CAMEL-1510 and will be fixed in Camel 1.6.1 and 2.0-M2. Can you give it a try again with the latest revision of Camel 2.0 trunk or Camel 1.x branch?

> ClosedByInterruptException in file endpoint when processing first message within aggregator
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1595
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1595
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M1
>         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
> Mac OS Leopard
>            Reporter: Ron Smith
>         Attachments: git_camel_problem_demo.tar.gz
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1595) ClosedByInterruptException in file endpoint when processing first message within aggregator

Posted by "Ron Smith (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ron Smith updated CAMEL-1595:
-----------------------------

    Attachment: git_camel_problem_demo.tar.gz

The attached project recreates the problem.
Run via mvn camel:run and a message such as

Message exchange has failed so breaking out of pipeline: Exchange[Message: aggregated] exception: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: target/reports/ID-Macintosh-local-51822-1241896763576-1-0 fault: null

is generated.


> ClosedByInterruptException in file endpoint when processing first message within aggregator
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-1595
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1595
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.0-M1
>         Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
> Mac OS Leopard
>            Reporter: Ron Smith
>         Attachments: git_camel_problem_demo.tar.gz
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.