Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camel cannot rename files after processing, as smooks keeps the file open (using UN/EDIFACT) #101

Open
alexis-morillo opened this issue Oct 9, 2015 · 1 comment

Comments

@alexis-morillo
Copy link

This seems to be related to

Is there any fix on this issue ? I'm using smooks 1.6.

@dxxr
Copy link

dxxr commented Nov 20, 2015

We've also stumbled upon this issue with the following camel route:

from( fileEndpoint )
    .convertBodyTo( StreamSource.class )
    .process( smooksProcessor )

The problem here is, that the message body conversion creates a StreamSource containing only the file path in the systemIdproperty.

Therefore, Smooks has to open a new InputStream internally for the file path provided, which will never be closed.

The workaround for us is so far to change the message body conversion to an InputStream:

from( fileEndpoint )
    .convertBodyTo( InputStream.class )     // <-- change
    .process( smooksProcessor )

The SmooksProcessor will then wrap that InputStreamin a StreamSource and Smooks will close the stream (by default) once the processing has finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants