You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fliot33 <fr...@poplidays.com> on 2015/11/06 19:22:21 UTC

JCIFS component and overwriting

Hi,
I'm using : wireTap to smb://XXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYY
And when trying to overwrite, I get

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file smb://XXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYY
	at
org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:296)
	at
org.apacheextras.camel.component.jcifs.SmbProducer.writeFile(SmbProducer.java:267)
	at
org.apacheextras.camel.component.jcifs.SmbProducer.processExchange(SmbProducer.java:122)
	at
org.apacheextras.camel.component.jcifs.SmbProducer.process(SmbProducer.java:70)
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
	at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:98)
	at
org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:94)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: jcifs.smb.SmbException: The system cannot find the path
specified.
	at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
	at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
	at jcifs.smb.SmbSession.send(SmbSession.java:238)
	at jcifs.smb.SmbTree.send(SmbTree.java:119)
	at jcifs.smb.SmbFile.send(SmbFile.java:775)
	at jcifs.smb.SmbFile.open0(SmbFile.java:989)
	at jcifs.smb.SmbFile.open(SmbFile.java:1006)
	at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
	at jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
	at
org.apacheextras.camel.component.jcifs.JcifsSmbApiFactory.createSmbFileOutputStream(JcifsSmbApiFactory.java:50)
	at
org.apacheextras.camel.component.jcifs.DefaultSmbClient.storeFile(DefaultSmbClient.java:134)
	at
org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:293)
	... 14 more
ERROR | Camel (PoplidaysCamelContext) thread #19 - WireTap | Could not
locate or create direction 'smb://XXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYY' due to
'jcifs.smb.SmbException: Cannot create a file when that file already
exists.'

I review component documentation, and I didn't find any additionnal
parameters, is there a simple way to do so ?

Thanks in advance.



--
View this message in context: http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JCIFS component and overwriting

Posted by fliot33 <fr...@poplidays.com>.
Hi,

Great thanks,
Indeed, using "fileExist=Override" did the trick.
I was thinking it was globally the default, but clearly not for the smb
component.

Thanks for your support.

Regards.



--
View this message in context: http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458p5773529.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: JCIFS component and overwriting

Posted by Pontus Ullgren <ul...@gmail.com>.
Which version of Camel and Camel Extra are you using?

You should be able to control this using the fileExist URI option. See the
documentation on the file component (http://camel.apache.org/file2.html)

On Fri, 6 Nov 2015, 19:22 fliot33 <fr...@poplidays.com> wrote:

> Hi,
> I'm using : wireTap to smb://XXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYY
> And when trying to overwrite, I get
>
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file smb://XXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYY
>         at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:296)
>         at
>
> org.apacheextras.camel.component.jcifs.SmbProducer.writeFile(SmbProducer.java:267)
>         at
>
> org.apacheextras.camel.component.jcifs.SmbProducer.processExchange(SmbProducer.java:122)
>         at
>
> org.apacheextras.camel.component.jcifs.SmbProducer.process(SmbProducer.java:70)
>         at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>         at
>
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
>         at
>
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
>         at
>
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:98)
>         at
>
> org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:94)
>         at java.util.concurrent.FutureTask.run(Unknown Source)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown
> Source)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> Source)
>         at java.lang.Thread.run(Unknown Source)
> Caused by: jcifs.smb.SmbException: The system cannot find the path
> specified.
>         at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:563)
>         at jcifs.smb.SmbTransport.send(SmbTransport.java:663)
>         at jcifs.smb.SmbSession.send(SmbSession.java:238)
>         at jcifs.smb.SmbTree.send(SmbTree.java:119)
>         at jcifs.smb.SmbFile.send(SmbFile.java:775)
>         at jcifs.smb.SmbFile.open0(SmbFile.java:989)
>         at jcifs.smb.SmbFile.open(SmbFile.java:1006)
>         at
> jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:142)
>         at
> jcifs.smb.SmbFileOutputStream.<init>(SmbFileOutputStream.java:97)
>         at
>
> org.apacheextras.camel.component.jcifs.JcifsSmbApiFactory.createSmbFileOutputStream(JcifsSmbApiFactory.java:50)
>         at
>
> org.apacheextras.camel.component.jcifs.DefaultSmbClient.storeFile(DefaultSmbClient.java:134)
>         at
>
> org.apacheextras.camel.component.jcifs.SmbOperations.storeFile(SmbOperations.java:293)
>         ... 14 more
> ERROR | Camel (PoplidaysCamelContext) thread #19 - WireTap | Could not
> locate or create direction 'smb://XXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYY' due to
> 'jcifs.smb.SmbException: Cannot create a file when that file already
> exists.'
>
> I review component documentation, and I didn't find any additionnal
> parameters, is there a simple way to do so ?
>
> Thanks in advance.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/JCIFS-component-and-overwriting-tp5773458.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>