cchet-camel-extras / camel-smbj

A camel library for using cifs/samba shares
Apache License 2.0
1 stars 1 forks source link

SMB File archive is not working #8

Open rokkakasu opened 3 years ago

rokkakasu commented 3 years ago

Hi Thomas,

I have tried a sample POC with below route, in Archive( Move Operation) the files are getting trucated to 0 bytes. File is reaching destination but Arcive is getting 0 bytes file.

SMBOperations renamefile operation is writing to 0 bytes.

from("smb://test_user@host/test/input/?localWorkDirectory=tmp&recursive=false&download=true&charset=utf-8&versions=2_1&fileExist=Move&moveExisting=.exists&delay=100&move=Archive/$simple{date:now:yyyy-MM-dd}/$simple{header.CamelFileNameOnly}&moveFailed=.failed&password=password") .to("file://src/main/data");

Thanks, R Ramarajan.

cchet commented 3 years ago

Hello @vrr6, haven't thougt about this repo for along time.

I will try to take a look at it at the weekend.

Maybe you give this one https://github.com/jborza/camel-smbj at try as well.

rokkakasu commented 3 years ago

Hi Thomas,

I tried above code base getting https://github.com/hierynomus/smbj/issues/283 I have faced the same when trying to implement the file archive manually

diskShare.remoteCopyto & Reading the share as input stream also thrown the same above Exception. my DFS version is 1_2.

Thanks, R Ramarajan

rokkakasu commented 3 years ago

Hi Thomas, a gentle remainder whether did you get chance to work on the issue.

Thanks, R Ramarajan.

rokkakasu commented 3 years ago

Hi Thomas,

I saw in https://issues.apache.org/jira/browse/CAMEL-12563 that you wished to add this component part of camel extras. I have done some changes to your module will you accept my PR and I want to carry this forward.

thanks, R Ramarajan.

cchet commented 3 years ago

@vrr6

Open a PR and I will take a look

1N0T commented 11 months ago

I got this error using camel-smbj on windows 10. I solved the problem by replacing the relative path in move option with the absolute path (from the shared folder)

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-core</artifactId>
    <version>2.25.0</version>
</dependency>
<dependency>
    <groupId>com.github.jborza</groupId>
    <artifactId>camel-smbj</artifactId>
    <version>0.2.22</version>
</dependency>
<dependency>
    <groupId>com.hierynomus</groupId>
    <artifactId>smbj</artifactId>
    <version>0.12.1</version>
</dependency>

relative path &move=processed should be replaced by &move=/directory/processed and this poins to //server/shared/directory/processed