Looks like you don't have access rights or write permissions given by your
ftp server admin.
On 25/06/2014 6:27 pm, "deepak_a" <[email protected]> wrote:

> Hi,
>
> I am using Camel 2.12.0.
> I am using the sftp component. The sFTP server is hosted on a UNIX based
> system.
>
> The following works fine when I 'PUT' a file manually
>
> This is What works:
>
> psftp> put D:\opt\share\Outbound_DTCC\DTS4\UP\C5T62\S60300
> put/DTS4.UP.C5T62.S60300
>
> I am trying to do something similar with a camel Route - but I am getting
> exception.
> Note: Its clear from the exception that I cannot chnage directory to /put
> and then 'PUT' my file, becuase the sFTP server hasd not provided privilege
> for doign a cd/ls command. But not sure how to get this to work.
>
>                         <from uri="jms:queue:queue.sftpToSDR"/>
>                         <setHeader headerName="CamelFileName">
>
>                                 <simple>put/DTS4.UP.C5T62.S60300</simple>
>                         <to
> uri="sftp://${emir.dtcc.sftp.user}@
> ${emir.dtcc.sftp.url}?password=${emir.dtcc.sftp.password}&amp;binary=true&amp;disconnect=true&amp;stepwise=false&amp;maximumReconnectAttempts=0"/>
>
>
> ]
>
> ]
>
> Stacktrace
>
> ---------------------------------------------------------------------------------------------------------------------------------------
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> change directory to: /apps/cdts/data_in_datapower/
>         at
>
> org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:542)[camel-ftp-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:499)[camel-ftp-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.component.file.remote.SftpOperations.buildDirectory(SftpOperations.java:438)[camel-ftp-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:267)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:166)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)[camel-ftp-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:132)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:307)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:127)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:41)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:91)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.spring.spi.TransactionErrorHandler.processByErrorHandler(TransactionErrorHandler.java:218)[camel-spring-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.spring.spi.TransactionErrorHandler$1.doInTransactionWithoutResult(TransactionErrorHandler.java:181)[camel-spring-2.12.0.jar:2.12.0]
>         at
>
> org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:33)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.apache.camel.spring.spi.TransactionErrorHandler.doInTransactionTemplate(TransactionErrorHandler.java:174)[camel-spring-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.spring.spi.TransactionErrorHandler.processInTransaction(TransactionErrorHandler.java:134)[camel-spring-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:103)[camel-spring-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.spring.spi.TransactionErrorHandler.process(TransactionErrorHandler.java:112)[camel-spring-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[camel-core-2.12.0.jar:2.12.0]
>         at
>
> org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[camel-jms-2.12.0.jar:2.12.0]
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:326)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:244)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1071)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1063)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at
>
> org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:960)[spring-jms-3.1.1.RELEASE.jar:3.1.1.RELEASE]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
> Source)[:1.6.0_45]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)[:1.6.0_45]
>         at java.lang.Thread.run(Unknown Source)[:1.6.0_45]
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Problem-with-sFTP-PUT-tp5752794.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Reply via email to