You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2008/10/13 09:20:52 UTC

[jira] Created: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

File component - can not delete consumed file when processing failed (look into real cause)
-------------------------------------------------------------------------------------------

                 Key: CAMEL-980
                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-core
    Affects Versions: 1.4.0
            Reporter: Claus Ibsen
            Assignee: Claus Ibsen
            Priority: Critical
             Fix For: 1.5.0


See nabble:
http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html

*Workaround*
Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46502#action_46502 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Thanks Christian.

Sorry I was a bit grumpy. It was late and I wasn't in the mood to fight with maven. 

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46523#action_46523 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Christian can you also try 1.5-SNAPSHOT as the file component had some changes as well, also regarding this WARN can not rename.

See camel download page for maven snapshot repo
http://activemq.apache.org/camel/download.html

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46524#action_46524 ] 

Christian Schneider commented on CAMEL-980:
-------------------------------------------

Hi Claus,

I am running Windows Vista but I donĀ“t think this is a OS dependent issue. Could you reproduce the error when you leave out the convertBodyTo ?

I have debugged the error. The problem seems to be in:
org.apache.camel.converter.jaxb.FallbackTypeConverter line 90

InputStream inputStream = parentTypeConverter.convertTo(InputStream.class, value);
            if (inputStream != null) {
>>>>                Object unmarshalled = unmarshaller.unmarshal(inputStream);
                return type.cast(unmarshalled);
            }

It opens an inputstream and calls unmarshall. I am not sure how unmarshall should work. Does it close the stream when all goes well?
In any case it leaves the stream open if some exception happens. So I think there should be a try {} finally {}  in FallbackTypeConverter that 
tries to close the stream. Of with a try catch on close. 

This block is probably also necessary for the other variants following.

What do you think?


> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46494#action_46494 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

I guess the failure can be simulated by just throwing an exception in the processor instead of all the jaxb failing?

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46529#action_46529 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Christian

Well spotted. I am working on a patch to properly close the stream after use. 

Could you then test it using 1.5-SNAPSHOT on your system to see if it works? 

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46417#action_46417 ] 

Christian Schneider commented on CAMEL-980:
-------------------------------------------

I have attached a complete example for file endpoint with jaxb and bean processor. The readme.txt explains how to use the example and how to reproduce this issue. 

Please write back if the example works and also shows you the issue.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46489#action_46489 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Have to add this to pom.xml

{code:xml}
    <pluginRepositories>
        <pluginRepository>
			<id>java.net</id> 
			<name>java.net Maven Repository</name> 
			<url>http://download.java.net/maven/1/</url> 
			<layout>legacy</layout> 
			<releases>
				<enabled>true</enabled> 
			</releases>
			<snapshots>
				<enabled>false</enabled> 
			</snapshots>
        </pluginRepository>
    </pluginRepositories>
{code}

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46530#action_46530 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

I have committed a fix. It should take 2+ hours for the new 1.5-SNAPSHOT to be published to the maven repo.

Maybe you can try tomorrow morning.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Resolved: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

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

Claus Ibsen resolved CAMEL-980.
-------------------------------

    Resolution: Fixed

That is so great. Thanks Christian for taking the time to provide a test app and pin point the issue.

I have looked elsewhere and have fixed a few other data formats as well where resources should be closed as well.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46515#action_46515 ] 

Christian Schneider commented on CAMEL-980:
-------------------------------------------

It was indeed quite a fight with maven. There are several different versions out there in several repositories and most do not work. The documentation from the plugin website also does not really help. ;-(

About your comment on using a processor to show the failure. I am not sure if it is possbile to do so. It depends where the file will be opened. I guess when I simply add a processor after the file endpoint the file will not be opened at all. So I would guess the error will not show. 

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46520#action_46520 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Sorry forgot about the convertBodyTo(String.class)

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46518#action_46518 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Christian when I run your sample using camel 1.4.0 and drop first the ok and then the error file I get:

C:\cameltest>dir /s /b
C:\cameltest\in
C:\cameltest\ok
C:\cameltest\error
C:\cameltest\ok\shiporder_ok.xml
C:\cameltest\ok\shiporder_error.xml
C:\cameltest\error\shiporder_error.xml

There is no files in the in folder that is locked etc. However you get the error files *twice* and as it's in the ok folder *and* the error folder. We might consider the *moveNamePrefix* option to only work if the processing was a success (no exceptions). 

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Updated: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

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

Christian Schneider updated CAMEL-980:
--------------------------------------

    Attachment: CamelExampleFileJaxb.zip

I have attached a new example with a working pom. Sorry .. did not check if it works with an empty repo.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46522#action_46522 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

However I am wondering if we should support a more flexible rename strategy so you can
- move to a folder if OK
- delete if OK
- move to another folder if ERROR
- delete if ERROR

Where you can mix and match what you need.

Well something to consider for Camel 2.0

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46519#action_46519 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Christian what OS are you using? I am on Windows XP.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Work started: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

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

Work on CAMEL-980 started by Claus Ibsen.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Updated: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

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

Christian Schneider updated CAMEL-980:
--------------------------------------

    Attachment:     (was: CamelExampleFileJaxb.zip)

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46521#action_46521 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

I think this is OS dependent. I have tried 1.4.0 and 1.5-SNAPSHOT with and without the convertBodyTo and all moves the file from IN.

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46491#action_46491 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Christian can you either supply a pom.xml that works out-of-the-box and can download all the needed .jars.
Or switch to another jaxb maven plugin that actually works and is installable.

Googling looks like you need to install manually and/or rename all versions to jswdp.

https://jaxb.dev.java.net/jaxb-maven2-plugin/
http://maven-plugins.sourceforge.net/maven-jaxb-plugin/


Downloading: http://download.java.net/maven/2/jwsdp/jaxb-api/jwsdp.1.5/jaxb-api-jwsdp.1.5.pom
Downloading: http://repository.jboss.org/maven2/jwsdp/jaxb-api/jwsdp.1.5/jaxb-api-jwsdp.1.5.pom
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/jwsdp/jaxb-api/jwsdp.1.5/jaxb-api-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-api/jwsdp.1.5/jaxb-api-jwsdp.1.5.pom
Downloading: https://maven-repository.dev.java.net/repository/jwsdp/jaxb-api/jwsdp.1.5/jaxb-api-jwsdp.1.5.pom
Downloading: http://repo1.maven.org/maven2/jwsdp/jaxb-api/jwsdp.1.5/jaxb-api-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-impl/jwsdp.1.5/jaxb-impl-jwsdp.1.5.pom
Downloading: http://repository.jboss.org/maven2/jwsdp/jaxb-impl/jwsdp.1.5/jaxb-impl-jwsdp.1.5.pom
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/jwsdp/jaxb-impl/jwsdp.1.5/jaxb-impl-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-impl/jwsdp.1.5/jaxb-impl-jwsdp.1.5.pom
Downloading: https://maven-repository.dev.java.net/repository/jwsdp/jaxb-impl/jwsdp.1.5/jaxb-impl-jwsdp.1.5.pom
Downloading: http://repo1.maven.org/maven2/jwsdp/jaxb-impl/jwsdp.1.5/jaxb-impl-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-xjc/jwsdp.1.5/jaxb-xjc-jwsdp.1.5.pom
Downloading: http://repository.jboss.org/maven2/jwsdp/jaxb-xjc/jwsdp.1.5/jaxb-xjc-jwsdp.1.5.pom
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/jwsdp/jaxb-xjc/jwsdp.1.5/jaxb-xjc-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-xjc/jwsdp.1.5/jaxb-xjc-jwsdp.1.5.pom
Downloading: https://maven-repository.dev.java.net/repository/jwsdp/jaxb-xjc/jwsdp.1.5/jaxb-xjc-jwsdp.1.5.pom
Downloading: http://repo1.maven.org/maven2/jwsdp/jaxb-xjc/jwsdp.1.5/jaxb-xjc-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-libs/jwsdp.1.5/jaxb-libs-jwsdp.1.5.pom
Downloading: http://repository.jboss.org/maven2/jwsdp/jaxb-libs/jwsdp.1.5/jaxb-libs-jwsdp.1.5.pom
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/jwsdp/jaxb-libs/jwsdp.1.5/jaxb-libs-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jaxb-libs/jwsdp.1.5/jaxb-libs-jwsdp.1.5.pom
Downloading: https://maven-repository.dev.java.net/repository/jwsdp/jaxb-libs/jwsdp.1.5/jaxb-libs-jwsdp.1.5.pom
Downloading: http://repo1.maven.org/maven2/jwsdp/jaxb-libs/jwsdp.1.5/jaxb-libs-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jax-qname/jwsdp.1.5/jax-qname-jwsdp.1.5.pom
Downloading: http://repository.jboss.org/maven2/jwsdp/jax-qname/jwsdp.1.5/jax-qname-jwsdp.1.5.pom
Downloading: http://mirrors.ibiblio.org/pub/mirrors/maven2/jwsdp/jax-qname/jwsdp.1.5/jax-qname-jwsdp.1.5.pom
Downloading: http://download.java.net/maven/2/jwsdp/jax-qname/jwsdp.1.5/jax-qname-jwsdp.1.5.pom

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Updated: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

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

Christian Schneider updated CAMEL-980:
--------------------------------------

    Attachment: CamelExampleFileJaxb.zip

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46488#action_46488 ] 

Claus Ibsen commented on CAMEL-980:
-----------------------------------

Christian. The jaxb stuff 'com.sun.tools.xjc.maven2' can not be found in the maven repo you have in the pom.xml

> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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


[jira] Commented: (CAMEL-980) File component - can not delete consumed file when processing failed (look into real cause)

Posted by "Christian Schneider (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-980?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46533#action_46533 ] 

Christian Schneider commented on CAMEL-980:
-------------------------------------------

Hi Claus,

I just updated my checkout and compiled myself. The issue does not occur anymore. 
Thanks for this fast fix.

Greetings

Christian


> File component - can not delete consumed file when processing failed (look into real cause)
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-980
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-980
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 1.4.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Critical
>             Fix For: 1.5.0
>
>         Attachments: CamelExampleFileJaxb.zip
>
>
> See nabble:
> http://www.nabble.com/Problem-with-FileEndpoint-td19940096s22882.html
> *Workaround*
> Use .convertBodyTo(String.class) in the route so the file is read into memory, and the java.io.File handler shouldn't be open/locked when camel attempts to delete it after wards.

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