Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F09FF10900 for ; Fri, 23 May 2014 06:01:06 +0000 (UTC) Received: (qmail 17046 invoked by uid 500); 23 May 2014 06:01:06 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 16937 invoked by uid 500); 23 May 2014 06:01:06 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 16929 invoked by uid 99); 23 May 2014 06:01:06 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2014 06:01:06 +0000 Date: Fri, 23 May 2014 06:01:06 +0000 (UTC) From: "Claus Ibsen (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-7451) FTP consumer sometimes throws NullPointerException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-7451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Claus Ibsen updated CAMEL-7451: ------------------------------- Fix Version/s: 2.14.0 2.13.2 2.12.4 > FTP consumer sometimes throws NullPointerException > -------------------------------------------------- > > Key: CAMEL-7451 > URL: https://issues.apache.org/jira/browse/CAMEL-7451 > Project: Camel > Issue Type: Bug > Components: camel-ftp > Affects Versions: 2.13.0 > Environment: Camel 2.13.1 > Oracle jdk 1.7.0_55 > Debian GNU/Linux oldstable > Remote ftp server IIS on Windows 2000 server > Reporter: Alberto Brosich > Priority: Minor > Fix For: 2.12.4, 2.13.2, 2.14.0 > > > I have an exception from a ftp consumer only for few files. > - It happens on few files (2 or 3). Remote directory contains many files > (many thousand) > - These few files have the same ownership and permissions of the others > and are not empty > - I stopped the application that create the files, to avoid any possible > lock (anyway, I can modify them without problems) > - I tried to copy and rename the files, removing the old one, (to create > a completely new one) without success > - Looking at the source code in > FtpChangedExclusiveReadLockStrategy.java, the error happens getting the > timestamp of the file: > {code} > for (FTPFile f : files) { > if (f.getName().equals(file.getFileNameOnly())) { > newLastModified = f.getTimestamp().getTimeInMillis(); > newLength = f.getSize(); > } > } > {code} > - Nothing useful in the logs of the ftp server > Follow a trace log and the exception regarding one of those files: > {code} > 2014-05-19 16:21:32,298 TRACE FtpChangedExclusiveReadLockStrategy - > Waiting for exclusive read lock to file: > RemoteFile[/dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml] > 2014-05-19 16:21:32,298 TRACE FtpChangedExclusiveReadLockStrategy - > Waiting for exclusive read lock to file: > RemoteFile[/dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml] > 2014-05-19 16:21:32,298 TRACE FtpChangedExclusiveReadLockStrategy - > Waiting for exclusive read lock to file: > RemoteFile[/dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml] > 2014-05-19 16:21:32,299 TRACE FtpChangedExclusiveReadLockStrategy - > Using fast exists to update file information for > RemoteFile[/dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml] > 2014-05-19 16:21:32,299 TRACE FtpChangedExclusiveReadLockStrategy - > Using fast exists to update file information for > RemoteFile[/dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml] > 2014-05-19 16:21:32,640 TRACE FtpChangedExclusiveReadLockStrategy - List > files /dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml found 1 files > 2014-05-19 16:21:32,640 TRACE FtpChangedExclusiveReadLockStrategy - List > files /dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml found 1 files > 2014-05-19 16:21:32,650 WARN FtpConsumer - > Endpoint[ftp://xxxx@yy.yy.yy.yy//dwrg1/moved?delay=60000&disconnect=true&fastExistsCheck=true&idempotent=true&idempotentKey=%24%7Bfile%3Aname%7D-%24%7Bfile%3Amodified%7D-%24%7Bfile%3Asize%7D&idempotentRepository=%23fileStore&include=DWRG1.*%5C.xml&maxMessagesPerPoll=10&noop=true&password=xxxxxx&readLock=changed&sortBy=file%3Amodified] cannot begin processing file: RemoteFile[/dwrg1/moved/DWRG1_2014-03-30T01h30Z.xml] due to: null. Caused by: [java.lang.NullPointerException - null] > java.lang.NullPointerException > at > org.apache.camel.component.file.remote.strategy.FtpChangedExclusiveReadLockStrategy.acquireExclusiveReadLock(FtpChangedExclusiveReadLockStrategy.java:83) > at > org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.begin(GenericFileProcessStrategySupport.java:49) > at > org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.begin(GenericFileRenameProcessStrategy.java:35) > at > org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:326) > at > org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:99) > at > org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201) > at > org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165) > at > org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187) > at > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114) > at java.util.concurrent.Executors > $RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) > at java.util.concurrent.ScheduledThreadPoolExecutor > $ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) > at java.util.concurrent.ScheduledThreadPoolExecutor > $ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at java.util.concurrent.ThreadPoolExecutor > $Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)