Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D04CF11B64 for ; Mon, 2 Jun 2014 12:06:15 +0000 (UTC) Received: (qmail 58093 invoked by uid 500); 2 Jun 2014 12:06:15 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 58048 invoked by uid 500); 2 Jun 2014 12:06:15 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 4559 invoked by uid 99); 2 Jun 2014 11:26:41 -0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Date: Mon, 2 Jun 2014 04:26:13 -0700 (PDT) From: simonglaubitz To: users@camel.apache.org Message-ID: <1401708373743-5751819.post@n5.nabble.com> Subject: camel-ftp: fileExist=Append not working MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I am currently working on a project to upgrade Apache Servicemix 3.3.2 installation to version 5.0.0, that comes along with Apache Camel 2.12.3. In my RouteBuilder I have defined one simple route that is supposed to take an MQ message and append the content of the message to a file on an FTP server: @Override public void configure() throws Exception { from("mqseries:queue:TEST.MESSAGE") .to("ftp://testuser@testserver/test?password=testpassword&fileName=test.txt&fileExist=Append"); } With Apache Servicemix 3.3.2 this route worked fine. With Apache Servicemix 5.0.0 I am getting the following exception: 550 Permission denied. But the credentials in the FTP connection string are absolutely correct and I am only getting the exception when the file (test.txt) already exists on FTP server side. When I delete the file on FTP server side and run the process again I do not get an exception and the file is created on remote destination. But when it comes to appending a string to the existing file this exception is thrown: Message History --------------------------------------------------------------------------------------------------------------------------------------- RouteId ProcessorId Processor Elapsed (ms) [route10 ] [route10 ] [mqseries://queue:TEST.MESSAGE ] [ 43] [route10 ] [to25 ] [ftp://testuser@testserver/test?password=testpassword&fileName=test.txt&fi] [ 42] Exchange --------------------------------------------------------------------------------------------------------------------------------------- Exchange[ Id ID-DUSNIST113-58008-1401706678781-2-1 ExchangePattern InOnly Headers {breadcrumbId=ID:414d5120514949552e4d512e4d414e413d77de5222fedf02, CamelFtpReplyCode=550, CamelFtpReplyString=550 Permission denied , CamelRedelivered=false, CamelRedeliveryCounter=0, JMS_IBM_Format=MQSTR , JMS_IBM_MQMD_CodedCharSetId=1208, JMS_IBM_MQMD_Encoding=546, JMS_IBM_MsgType=8, JMS_IBM_PutApplType=28, JMS_IBM_PutDate=20140602, JMS_IBM_PutTime=11034472, JMSCorrelationID=null, JMSDeliveryMode=1, JMSDestination=null, JMSExpiration=0, JMSMessageID=ID:414d5120514949552e4d512e4d414e413d77de5222fedf02, JMSPriority=0, JMSRedelivered=false, JMSReplyTo=null, JMSTimestamp=1401707024720, JMSType=null, JMSXAppID=WebSphere MQ Client for Java, JMSXDeliveryCount=1, JMSXGroupID=null, JMSXUserID=MUSR_MQADMIN} BodyType String Body test ] Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- org.apache.camel.component.file.GenericFileOperationFailedException: Error writing file [test/test.txt] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:280)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[220:org.apache.camel.camel-ftp:2.12.3] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:132)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:307)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:127)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[199:org.apache.camel.camel-jms:2.12.3] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1103)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1095)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:992)[157:org.springframework.jms:3.2.4.RELEASE] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_25] at java.lang.Thread.run(Thread.java:662)[:1.6.0_25] 02.06.2014 13:03:44,932 | WARN | Camel (ftpAgent) thread #6 - JmsConsumer[OCR.ONAIR.MESSAGE] | EndpointMessageListener | .apache.camel.util.CamelLogger 224 | Execution of JMS message listener failed. Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Error writing file [test/test.txt]] org.apache.camel.component.file.GenericFileOperationFailedException: Error writing file [test/test.txt] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:280)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[220:org.apache.camel.camel-ftp:2.12.3] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:132)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:307)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:127)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[110:org.apache.camel.camel-core:2.12.3] at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[199:org.apache.camel.camel-jms:2.12.3] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1103)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1095)[157:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:992)[157:org.springframework.jms:3.2.4.RELEASE] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_25] at java.lang.Thread.run(Thread.java:662)[:1.6.0_25] -- View this message in context: http://camel.465427.n5.nabble.com/camel-ftp-fileExist-Append-not-working-tp5751819.html Sent from the Camel - Users mailing list archive at Nabble.com.