Did you try logging the headers?
.log( “Stderr: ${header[CamelExecStderr]} )
or
.log( “Exit Value: ${header[CamelExecExitValue]} )
Quinn Stevenson
[email protected]
(801) 244-7758
> On Dec 28, 2016, at 2:13 PM, jgewehr <[email protected]> wrote:
>
> I'm trying to figure out why my exec of a python script is failing. My route
> looks like this:
>
> from.("sftp....")
> .to("file...")
> .to("exec:test.py")
> .to("log:foo?showAll");
>
> So I'm transferring a file from an SFTP server to the local filesystem, and
> then I want to run a python script on it. The file transfer is working
> fine. However, my python script is returning an error. When I look in the
> log I see CamelExecStderr=java.io.ByteArrayInputStream@5944a314. According
> to the Exec component page here http://camel.apache.org/exec.html:
>
> ExecBinding.EXEC_STDERR java.io.InputStream The value of this header points
> to the standard error stream (stderr) of the executable.
>
> I just want to print the actual string value of stderr, not
> java.io.ByteArrayInputStream@5944a314. I feel like this should be easy and
> I'm missing something. How do I print the value of the headers on the Exec
> component page, for example ExecBinding.EXEC_STDERR or
> ExecBinding.EXEC_EXIT_VALUE?
>
> Help?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Debug-exec-of-python-script-tp5791982.html
> Sent from the Camel - Users mailing list archive at Nabble.com.