On Mon, Aug 13, 2012 at 7:00 PM, pglebow <pgle...@gmail.com> wrote:
> Hi Claus,
>
>   Thank you for the fix.  I used
> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.11-SNAPSHOT/apache-camel-2.11-20120813.030929-58.zip
> and the test case passes.
>
>   Is there a plan to put this into a maintenance release for 2.10?  We
> have a big release coming up of our application in about 2 months time
> and a fix for this issue is critical for us.  If not, I could roll
> back to 2.9.1 but I would prefer to go forward if possible.  Thanks
> again!
>

Yes the bug should be fixed on 2.10 branch as well. As we backport the
bug fixes from trunk to the branches.

We usually do a patch release in a 6-12 weeks cycle. And especially
more frequent when its a brand new release, as eg 2.10.0 is.
To get bug fixes faster on that branch.



> Phil
>
> On Mon, Aug 13, 2012 at 9:34 AM, Claus Ibsen-2 [via Camel]
> <ml-node+s465427n5717257...@n5.nabble.com> wrote:
>> On Mon, Aug 13, 2012 at 6:30 PM, pglebow <[hidden email]> wrote:
>>
>>> Hi Claus,
>>>
>>>   I tried with a snapshot and still encountered the error.  I've
>>> detailed my test procedure below between the
>>> ====s; the test case was the same one that I sent previously.
>>>
>>> Phil
>>> ====
>>> 1. Downloaded this snapshot:
>>>
>>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.10-SNAPSHOT/apache-camel-2.10-20120617.030556-150.zip
>>>
>>
>> Ah you need a 2.11 SNAPSHOT. That 2.10 is outdated.
>> https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.11-SNAPSHOT/
>>
>> I can see the link on the download page hasn't been updated. Let me fix
>> that.
>>
>>
>>> 2. Replaced these jars with snapshot versions:
>>>
>>> bindy, core, flatpack, ftp, http, jetty, jms, mail, quartz, spring,
>>> sql, test, test-spring
>>>
>>> 3. Reran the test under Windows 7
>>>
>>> 4. Encountered this error (more detail below as well):
>>>
>>> 31312 [Camel (camel-1) thread #0 - file://c:/fileMoveTest/in] WARN
>>> org.apache.camel.component.file.GenericFileOnCompletion - Caused by:
>>> [org.apache.camel.component.file.GenericFileOperationFailedException -
>>> Error renaming file from c:\fileMoveTest\in\test.csv to
>>> c:\fileMoveTest\in\.processed\test.csv]
>>> org.apache.camel.component.file.GenericFileOperationFailedException:
>>> Error renaming file from c:\fileMoveTest\in\test.csv to
>>> c:\fileMoveTest\in\.processed\test.csv
>>>         at
>>> org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:72)
>>>         at
>>> org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:107)
>>>         at
>>> org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86)
>>>         at
>>> org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:132)
>>>         at
>>> org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82)
>>>         at
>>> org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53)
>>>         at
>>> org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:55)
>>>         at
>>> org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:226)
>>>
>>> Caused by: java.io.IOException: Renaming file from:
>>> c:\fileMoveTest\in\test.csv to: c:\fileMoveTest\in\.processed\test.csv
>>> failed due cannot delete from file: c:\fileMoveTest\in\test.csv after
>>> copy succeeded
>>>         at org.apache.camel.util.FileUtil.renameFile(FileUtil.java:362)
>>>         at
>>> org.apache.camel.component.file.FileOperations.renameFile(FileOperations.java:70)
>>>         ... 41 more
>>> ===
>>>
>>> On Mon, Aug 13, 2012 at 4:37 AM, Claus Ibsen-2 [via Camel]
>>> <[hidden email]> wrote:
>>>> Hi
>>>>
>>>> Maybe its related to
>>>> https://issues.apache.org/jira/browse/CAMEL-5461
>>>>
>>>> That on windows a stream is open on the file, and thus cannot move the
>>>> file afterwards.
>>>>
>>>> Can you try with SNAPSHOT code?
>>>>
>>>> On Wed, Aug 8, 2012 at 11:33 PM, pglebow <[hidden email]> wrote:
>>>>
>>>>> I'm struggling with a very odd issue with Camel 2.10 and I'm hoping
>>>>> someone
>>>>> could explain why it's occurring.  I've attached a test case that
>>>>> demonstrates the issue.  It is a very simple route - just take a file
>>>>> from
>>>>> a
>>>>> local directory and FTP it to a server.  Here is the problem:
>>>>>
>>>>> When I specify the character set in the file producer, Camel cannot
>>>>> rename
>>>>> the file from the source directory to the .processed directory (.move
>>>>> directory).  It is unable to acquire an exclusive file lock.
>>>>>
>>>>> However, when I remove the charset=UTF-8 parameter, everything works
>>>>> properly.  The file is FTPed and is moved to the .processed directory.
>>>>>
>>>>> Why does the character encoding cause an issue with read locks?  Am I
>>>>> doing
>>>>> something incorrect or is this a bug?  I'm using Camel 2.10 and Java
>>>>> 1.6.0_33 under Windows 7.
>>>>>
>>>>> ------------
>>>>> - Test case
>>>>> ------------
>>>>> package com.comp.test.camel.route.impl;
>>>>>
>>>>> import junit.framework.Assert;
>>>>>
>>>>> import org.apache.camel.builder.RouteBuilder;
>>>>> import org.apache.camel.test.junit4.CamelTestSupport;
>>>>> import org.apache.commons.logging.Log;
>>>>> import org.apache.commons.logging.LogFactory;
>>>>> import org.junit.Test;
>>>>>
>>>>> public class FileMoveTest extends CamelTestSupport {
>>>>>
>>>>>     protected Log log = LogFactory.getLog(FileMoveTest.class);
>>>>>
>>>>>     @Test
>>>>>     public void testRoute() throws Exception {
>>>>>         try {
>>>>>             Thread.sleep(140000);
>>>>>         } catch (Exception e) {
>>>>>             log.error(e.getMessage(), e);
>>>>>             Assert.fail(e.getMessage());
>>>>>         }
>>>>>
>>>>>     }
>>>>>
>>>>>     /*
>>>>>      * (non-Javadoc)
>>>>>      *
>>>>>      * @see
>>>>> org.apache.camel.test.junit4.CamelTestSupport#createRouteBuilder()
>>>>>      */
>>>>>     @Override
>>>>>     protected RouteBuilder createRouteBuilder() throws Exception {
>>>>>         return new RouteBuilder() {
>>>>>
>>>>>             @Override
>>>>>             public void configure() throws Exception {
>>>>>                 // Works
>>>>>                 //
>>>>>
>>>>>
>>>>> from("file://c:/fileMoveTest/in?move=.processed&moveFailed=.failed&delay=5000&readLock=rename&include=.*\\.csv$").to(
>>>>>                 //
>>>>>
>>>>>
>>>>> "ftp://anonymous@ftpTest/test?password=anonymous&delay=5000&throwExceptionOnConnectFailed=true";);
>>>>>
>>>>>                 // Fails
>>>>>
>>>>>
>>>>>
>>>>> from("file://c:/fileMoveTest/in?charset=UTF-8&move=.processed&moveFailed=.failed&delay=5000&readLock=rename&include=.*\\.csv$").to(
>>>>>
>>>>>
>>>>>
>>>>> "ftp://anonymous@ftpTest/test?password=anonymous&delay=5000&throwExceptionOnConnectFailed=true";);
>>>>>             }
>>>>>         };
>>>>>     }
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>>
>>>>> http://camel.465427.n5.nabble.com/Character-set-issue-with-File-Consumer-FTP-Publication-tp5717025.html
>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>> --
>>>> Claus Ibsen
>>>> -----------------
>>>> FuseSource
>>>> Email: [hidden email]
>>>> Web: http://fusesource.com
>>>> Twitter: davsclaus, fusenews
>>>> Blog: http://davsclaus.com
>>>> Author of Camel in Action: http://www.manning.com/ibsen
>>>>
>>>>
>>>> ________________________________
>>>> If you reply to this email, your message will be added to the discussion
>>>> below:
>>>>
>>>> http://camel.465427.n5.nabble.com/Character-set-issue-with-File-Consumer-FTP-Publication-tp5717025p5717229.html
>>>> To unsubscribe from Character set issue with File Consumer & FTP
>>>> Publication, click here.
>>>> NAML
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Character-set-issue-with-File-Consumer-FTP-Publication-tp5717025p5717256.html
>>
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: [hidden email]
>> Web: http://fusesource.com
>> Twitter: davsclaus, fusenews
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>> http://camel.465427.n5.nabble.com/Character-set-issue-with-File-Consumer-FTP-Publication-tp5717025p5717257.html
>> To unsubscribe from Character set issue with File Consumer & FTP
>> Publication, click here.
>> NAML
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Character-set-issue-with-File-Consumer-FTP-Publication-tp5717025p5717259.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to