[jira] Created: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
FTPConsumer - Error in Rename Strategy.
---------------------------------------

                 Key: CAMEL-1290
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-ftp
    Affects Versions: 2.0.0
         Environment: Windows XP
            Reporter: Paddy Daly


Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.

<endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
@8f7aa2] FtpConsumer.log(207) | String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1938)
        at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
        at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
        at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
.acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
        at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
moteFileProcessStrategySupport.java:32)
        at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
mer.java:131)
        at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
)
        at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
ThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
dThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
oolExecutor.java:205)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)


A workaround is to add a folder in the url like the following
<endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>


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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48908#action_48908 ]

Claus Ibsen commented on CAMEL-1290:
------------------------------------

Paddy thank for the bug report.

We are in the works of a big refactor in trunk to allow the file based transports to be much more reuseable between types (a kind of VFS in Camel itself)
So I will refrain from committing to the trunk right now in the FTP/File component.

We need to get this refactor done first, with help from Ramon Buckland that is working on this right now.



> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

Ramon Buckland-5
yes Thanks Paddy, I will assign this to me once I have sorted each step in
the refactor.

Cheers



On Fri, Jan 23, 2009 at 17:33, Claus Ibsen (JIRA) <[hidden email]> wrote:

>
>    [
> https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48908#action_48908]
>
> Claus Ibsen commented on CAMEL-1290:
> ------------------------------------
>
> Paddy thank for the bug report.
>
> We are in the works of a big refactor in trunk to allow the file based
> transports to be much more reuseable between types (a kind of VFS in Camel
> itself)
> So I will refrain from committing to the trunk right now in the FTP/File
> component.
>
> We need to get this refactor done first, with help from Ramon Buckland that
> is working on this right now.
>
>
>
> > FTPConsumer - Error in Rename Strategy.
> > ---------------------------------------
> >
> >                 Key: CAMEL-1290
> >                 URL:
> https://issues.apache.org/activemq/browse/CAMEL-1290
> >             Project: Apache Camel
> >          Issue Type: Bug
> >          Components: camel-ftp
> >    Affects Versions: 2.0.0
> >         Environment: Windows XP
> >            Reporter: Paddy Daly
> >
> > Consuming from a FTP server using the following endpoint cause a
> StringIndexOutOfBoundsException when using the rename strategy.
> > <endpoint id="candidateUrl" uri="ftp://username@
> 127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename
> "/>
> > 22 Jan 2009 09:36:59,501 ERROR [Thread: 1
> org.apache.camel.component.file.remote.RemoteFileComponent
> > @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> > java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> >         at java.lang.String.substring(String.java:1938)
> >         at
> org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
> >         at
> org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
> >         at
> org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> >
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
> >         at
> org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> > moteFileProcessStrategySupport.java:32)
> >         at
> org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> > mer.java:131)
> >         at
> org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> > )
> >         at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> >         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> >         at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> >         at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> > ThreadPoolExecutor.java:98)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> > dThreadPoolExecutor.java:181)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> > oolExecutor.java:205)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >         at java.lang.Thread.run(Thread.java:619)
> > A workaround is to add a folder in the url like the following
> > <endpoint id="candidateUrl" uri="ftp://username@
> 127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename
> "/>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramon Buckland reassigned CAMEL-1290:
-------------------------------------

    Assignee: Ramon Buckland

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Work started: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1290 started by Ramon Buckland.

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48935#action_48935 ]

Ramon Buckland commented on CAMEL-1290:
---------------------------------------

The issue is caused by a call to getParentFile which assumes a / root path exists. Since there doesn't in an "ftp" server relative manner, the fix is simply to check first

The patch and test case are attached. (see following)
It does not affect Camel 1.5.x


The fix is simply a check on resolving the getParent method in the new GenericFile. This change is applied AFTER CAMEL-1241 - CAMEL-1241_Refactor_S-FTP_to_use_GenericYYY.patch is applied.

OLD
{code}
    public String getParent() {
        return getAbsoluteFileName().substring(0, getAbsoluteFileName().lastIndexOf("/"));
    }
{code}

NEW
{code}
    public String getParent() {
        if (getAbsoluteFileName().lastIndexOf("/") > 0) {
            return getAbsoluteFileName().substring(0, getAbsoluteFileName().lastIndexOf("/"));
        } else {
            return "";
        }
    }
{code}


> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramon Buckland updated CAMEL-1290:
----------------------------------

    Attachment: CAMEL-1290_Fix_StringIndexOutOfBounds.diff

This fix can (should) only be applied to CAMEL-1241 after

CAMEL-1241_Refactor_S-FTP_to_use_GenericYYY.patch

is applied.

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramon Buckland updated CAMEL-1290:
----------------------------------

    Attachment: CAMEL-1290_TestToShowFix.diff

This is the test case.

It does NOT depend on 1241, of course, it will fail if the attached patch is not applied.

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Work stopped: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1290 stopped by Ramon Buckland.

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Work logged: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#action_36802 ]

Ramon Buckland logged work on CAMEL-1290:
-----------------------------------------

                Author: Ramon Buckland
            Created on: 25/Jan/09 05:08 PM
            Start Date: 25/Jan/09 05:07 PM
    Worklog Time Spent: 30 minutes
      Work Description: add test case and resolved issue.

Issue Time Tracking
-------------------

            Time Spent: 30 minutes
    Remaining Estimate: 0 minutes

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Ramon Buckland
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ramon Buckland reassigned CAMEL-1290:
-------------------------------------

    Assignee: Claus Ibsen  (was: Ramon Buckland)

Claus, please apply patches as required.

In order
1. (apply CAMEL-1241 - CAMEL-1241_Refactor_S-FTP_to_use_GenericYYY.patch )
2. two attached file (patch and test case)

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Claus Ibsen
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48951#action_48951 ]

Claus Ibsen commented on CAMEL-1290:
------------------------------------

@Paddy

The fix should have been committed just recently.

But the fix is part of a big refactor of the, underlying file transport in Camel, that the FTP now sits on top off. So please test it a bit throughly as there might have slipped a bug in the refactor. Its still an ongoing refactor, but the FTP part should be mostly done.




> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Claus Ibsen
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48955#action_48955 ]

Paddy Daly commented on CAMEL-1290:
-----------------------------------

Claus
I should have more time to check this tomorrow.

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Claus Ibsen
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

    [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49011#action_49011 ]

Paddy Daly commented on CAMEL-1290:
-----------------------------------

Its working now :-)

I be able to test the new build more throughly next week and I'll report any problems I might find.
Sorry about the delay.

-P

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Claus Ibsen
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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

Reply | Threaded
Open this post in threaded view
|

Re: [jira] Commented: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

Ramon Buckland-5
Great, Thanks paddy for letting us know

On Thu, Jan 29, 2009 at 20:54, Paddy Daly (JIRA) <[hidden email]> wrote:

>
>    [
> https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=49011#action_49011]
>
> Paddy Daly commented on CAMEL-1290:
> -----------------------------------
>
> Its working now :-)
>
> I be able to test the new build more throughly next week and I'll report
> any problems I might find.
> Sorry about the delay.
>
> -P
>
> > FTPConsumer - Error in Rename Strategy.
> > ---------------------------------------
> >
> >                 Key: CAMEL-1290
> >                 URL:
> https://issues.apache.org/activemq/browse/CAMEL-1290
> >             Project: Apache Camel
> >          Issue Type: Bug
> >          Components: camel-ftp
> >    Affects Versions: 2.0.0
> >         Environment: Windows XP
> >            Reporter: Paddy Daly
> >            Assignee: Claus Ibsen
> >         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff,
> CAMEL-1290_TestToShowFix.diff
> >
> >          Time Spent: 30 minutes
> >  Remaining Estimate: 0 minutes
> >
> > Consuming from a FTP server using the following endpoint cause a
> StringIndexOutOfBoundsException when using the rename strategy.
> > <endpoint id="candidateUrl" uri="ftp://username@
> 127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename
> "/>
> > 22 Jan 2009 09:36:59,501 ERROR [Thread: 1
> org.apache.camel.component.file.remote.RemoteFileComponent
> > @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> > java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> >         at java.lang.String.substring(String.java:1938)
> >         at
> org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
> >         at
> org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
> >         at
> org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> >
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
> >         at
> org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> > moteFileProcessStrategySupport.java:32)
> >         at
> org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> > mer.java:131)
> >         at
> org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> > )
> >         at
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> >         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> >         at
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> >         at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> > ThreadPoolExecutor.java:98)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> > dThreadPoolExecutor.java:181)
> >         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> > oolExecutor.java:205)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> >         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> >         at java.lang.Thread.run(Thread.java:619)
> > A workaround is to add a folder in the url like the following
> > <endpoint id="candidateUrl" uri="ftp://username@
> 127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename
> "/>
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (CAMEL-1290) FTPConsumer - Error in Rename Strategy.

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/activemq/browse/CAMEL-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1290.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0

> FTPConsumer - Error in Rename Strategy.
> ---------------------------------------
>
>                 Key: CAMEL-1290
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1290
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 2.0.0
>         Environment: Windows XP
>            Reporter: Paddy Daly
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0
>
>         Attachments: CAMEL-1290_Fix_StringIndexOutOfBounds.diff, CAMEL-1290_TestToShowFix.diff
>
>          Time Spent: 30 minutes
>  Remaining Estimate: 0 minutes
>
> Consuming from a FTP server using the following endpoint cause a StringIndexOutOfBoundsException when using the rename strategy.
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>
> 22 Jan 2009 09:36:59,501 ERROR [Thread: 1 org.apache.camel.component.file.remote.RemoteFileComponent
> @8f7aa2] FtpConsumer.log(207) | String index out of range: -1
> java.lang.StringIndexOutOfBoundsException: String index out of range: -1
>         at java.lang.String.substring(String.java:1938)
>         at org.apache.camel.component.file.remote.RemoteFile.getParent(RemoteFile.java:139)
>         at org.apache.camel.component.file.remote.RemoteFile.changeFileName(RemoteFile.java:65)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileRenameExclusiveReadLockStrategy
> .acquireExclusiveReadLock(RemoteFileRenameExclusiveReadLockStrategy.java:45)
>         at org.apache.camel.component.file.remote.strategy.RemoteFileProcessStrategySupport.begin(Re
> moteFileProcessStrategySupport.java:32)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsu
> mer.java:131)
>         at org.apache.camel.component.file.remote.RemoteFileConsumer.poll(RemoteFileConsumer.java:98
> )
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(Scheduled
> ThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(Schedule
> dThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
> oolExecutor.java:205)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:619)
> A workaround is to add a folder in the url like the following
> <endpoint id="candidateUrl" uri="ftp://username@127.0.0.1//myFolder/?password=password&amp;delete=true&amp;binary=true&amp;delay=10000&amp;readLock=rename"/>

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