在camel exec

时间:2018-05-23 12:52:19

标签: apache-camel

我无法弄清楚执行以下操作的语法:

bteq < /data/bteqs/test.bteq

将camel-exec http://camel.apache.org/exec.html与蓝图XML一起使用。

我可能在这里遗漏了一些非常微不足道的东西 - 到目前为止,我已经试图通过整个&#34;&lt; /data/bteqs/test.bteq"部分作为论据。

我也试图通过使用eval克服这个问题:

<to uri="exec:eval?args=&quot;bteq &lt; /data/bteqs/test.bteq&quot;"/>

但显然eval至少在我的操作系统上不能与exec一起工作:

2018-05-23 12:50:15,017 | INFO  | .xml-43_Worker-2 | bteq-test-route                  
| 43 - org.apache.camel.camel-core - 2.16.5 | ERROR :: Unable to execute 
command ExecCommand [args=[bteq < /data/bteqs/test.bteq], executable=eval, 
timeout=9223372036854775807, outFile=null, workingDir=null, 
useStderrOnEmptyStdout=false]
STACKTRACE :: org.apache.camel.component.exec.ExecException: Unable to 
execute command ExecCommand [args=[bteq < /data/bteqs/test.bteq], 
executable=eval, timeout=9223372036854775807, outFile=null, workingDir=null, 
useStderrOnEmptyStdout=false]

1 个答案:

答案 0 :(得分:0)

只是一个猜测,但也许你必须使用shell作为“运行时”来执行命令。

<to uri="exec:sh?args=&quot;bteq &lt; /data/bteqs/test.bteq&quot;"/>