camel-exec:找不到端点错误

时间:2019-08-06 07:09:25

标签: apache-camel

下面是使用者端点。尝试使用骆驼执行进程uri执行linux / unix命令。

<recipientList>
    <simple>exec:bash?args=-c CFTUTIL SEND IDF=${property[cftFlowIdentifier]}, PART=${property[cftParterName]}, FNAME=${property[cftFullFilePath]}, FNAME=${property[cftDestinationPath]}/${property[cftFileName]}</simple>
</recipientList>

高于端点会导致以下错误。

org.apache.camel.NoSuchEndpointException: No endpoint could be found for: PART=

请检查使用骆驼exec uri调用上述命令时是否存在任何错误。在普通的Java程序中,同一命令已成功执行。

1 个答案:

答案 0 :(得分:1)

Recipient List EIP接受以逗号分隔的端点列表。如果需要在URL中使用逗号,请禁用或使用其他定界符。

<recipientList delimiter="false">
   <simple>...</simple>
</recipientList>

您也可以切换到To D EIP,因为您只呼叫一个端点,所以它更适合您的需求。

<toD uri="exec:bash?args=-c CFTUTIL SEND IDF=${property[cftFlowIdentifier]}, PART=${property[cftParterName]}, FNAME=${property[cftFullFilePath]}, FNAME=${property[cftDestinationPath]}/${property[cftFileName]}"/>