3 Replies Latest reply on Jun 13, 2012 9:33 AM by davsclaus

    Need help in Exec

    sanjayeipl

      I am trying Exec component... running md5sum.exe. I can see it running in process list (in task manager). Also the exit code is 0 (success). However, I do not see its output in the outFile specified. Am I missing anything?

       

      Here is route from my camel-context xml.

      -


           

      -


       

      Here is console output...

       

       

      \[mel-1) thread #1 - timer://foo\] ExecProducer                   INFO  Executing ExecCommand \[args=\[Work.pst\], executable=md5sum.exe, timeout=9223372036854775807, outFile=\temp\md5sum.txt, workingDir=c:/data/pst, useStderrOnEmptyStdout=false\]

      \[mel-1) thread #1 - timer://foo\] ExecProducer                   INFO  The command ExecCommand \[args=\[Work.pst\], executable=md5sum.exe, timeout=9223372036854775807, outFile=\temp\md5sum.txt, workingDir=c:/data/pst, useStderrOnEmptyStdout=false\] had exit value 0

      -


       

      Regards,

      Sanjay

        • 1. Re: Need help in Exec
          davsclaus

          The output file option is for the exec component to consider the content of that file as the "reply" message. So in the Camel route the message will then read the content of that output file as the new message content.

           

          Does the md5sum.exe create an output file at all?

           

          And maybe the path of the output file should use absolute as well? eg c:/temp/md5sum.log

          • 2. Re: Need help in Exec
            sanjayeipl

            1. No. md5sume.exe does not create output file.

             

            2. Path is not the problem.

            • 3. Re: Need help in Exec
              davsclaus

              The outputFile is only to be used, if you execute some process that creates an output file, which you want to have Camel "read" as the result.

               

              So if the md5sum.exe do not create any output file, then do not use that option. Instead Camel will use the output on the console as the "result".