You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by seazor <jg...@skynet.be> on 2013/02/27 11:02:39 UTC

Problem with donefilename on sftp.

Hi all,
i have a problem when writing donefilename on sftp. (Camel version 2.10.3)

I tried some possibilities in my route :
1) 
.to("sftp://camel@port-jogu?password=xxx&fileName=test.csv&doneFileName=test.done")
All two files are written, but not in the place i wanted.

2) 
.to("sftp://camel@port-jogu/folder?password=xxx&fileName=test.csv&doneFileName=test.done")
The results are :
folder/test.csv (file OK)
folder/folder     (sub-folder empty : not OK)
and this stack trace :
org.apache.camel.CamelExecutionException: Exception occurred during
execution on the exchange: Exchange[Message: 01234567890
01234567820
]
	at
org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1287)
	at
org.apache.camel.util.ExchangeHelper.extractResultBody(ExchangeHelper.java:618)
	at
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:454)
	at
org.apache.camel.impl.DefaultProducerTemplate.extractResultBody(DefaultProducerTemplate.java:450)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:126)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:131)
	at
be.smals.dp.routes.lb.AskTutorWSRouteTest.testSend(AskTutorWSRouteTest.java:72)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:66)
	at
org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:105)
	at
org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runTestMethod(UnitilsJUnit4TestClassRunner.java:174)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:86)
	at
org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:94)
	at
org.unitils.UnitilsJUnit4TestClassRunner$TestListenerInvokingMethodRoadie.runBeforesThenTestThenAfters(UnitilsJUnit4TestClassRunner.java:156)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:84)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:49)
	at
org.unitils.UnitilsJUnit4TestClassRunner.invokeTestMethod(UnitilsJUnit4TestClassRunner.java:95)
	at
be.smals.stve.unitilsmodules.runner.StveJunit4TestClassRunner.invokeTestMethod(StveJunit4TestClassRunner.java:94)
	at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:61)
	at
org.unitils.UnitilsJUnit4TestClassRunner.access$000(UnitilsJUnit4TestClassRunner.java:44)
	at
org.unitils.UnitilsJUnit4TestClassRunner$1.run(UnitilsJUnit4TestClassRunner.java:62)
	at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44)
	at
org.unitils.UnitilsJUnit4TestClassRunner.run(UnitilsJUnit4TestClassRunner.java:68)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by:
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
change directory to: folder
	at
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:434)
	at
org.apache.camel.component.file.remote.SftpOperations.changeCurrentDirectory(SftpOperations.java:422)
	at
org.apache.camel.component.file.remote.SftpOperations.storeFile(SftpOperations.java:661)
	at
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:249)
	at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:192)
	at
org.apache.camel.component.file.remote.RemoteFileProducer.process(RemoteFileProducer.java:49)
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)
	at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)
	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:334)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:220)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:303)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:45)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:122)
	at
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:73)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)
	at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:86)
	at
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)
	at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:366)
	at
org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:337)
	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:233)
	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:337)
	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:175)
	at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:111)
	at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:124)
	... 28 more
Caused by: 4: Failure
	at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2569)
	at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2100)
	at com.jcraft.jsch.ChannelSftp.cd(ChannelSftp.java:315)
	at
org.apache.camel.component.file.remote.SftpOperations.doChangeDirectory(SftpOperations.java:432)
	... 74 more


Am i missing something ?

Thanks in advance for any info.

Joël



--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-donefilename-on-sftp-tp5728209.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Problem with donefilename on sftp.

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Feb 28, 2013 at 8:47 AM, seazor <jg...@skynet.be> wrote:
> I continued some others tests...
>
> All this work correctly with file:, with ftp: but not with sftp:
>
> If someone can check and/or help me (workaround? bug report? other?) , it
> would be very appreciated.
>

There is a known issue in Camel 2.10.3 with the sftp component.
Use 2.10.2 or the new 2.10.4.


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Problem-with-donefilename-on-sftp-tp5728209p5728281.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Problem with donefilename on sftp.

Posted by seazor <jg...@skynet.be>.
I continued some others tests...

All this work correctly with file:, with ftp: but not with sftp:

If someone can check and/or help me (workaround? bug report? other?) , it
would be very appreciated.



--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-donefilename-on-sftp-tp5728209p5728281.html
Sent from the Camel - Users mailing list archive at Nabble.com.