Apache camel 未能解析终结点:未找到方案为exec的组件
我试图使用Apache Camel调用一个简单的shell脚本,但出现错误:Apache camel 未能解析终结点:未找到方案为exec的组件,apache-camel,spring-camel,Apache Camel,Spring Camel,我试图使用Apache Camel调用一个简单的shell脚本,但出现错误: 解析终结点失败:exec:///usr/local/karaf/data/tmp/test.sh 原因:未找到具有scheme:exec的组件 在我的camel-context.xml中 <route id="common_route"> <from uri="direct:common_route" /> <to uri="exec:/usr/local/karaf/
解析终结点失败:exec:///usr/local/karaf/data/tmp/test.sh 原因:未找到具有scheme:exec的组件
在我的camel-context.xml中
<route id="common_route">
<from uri="direct:common_route" />
<to uri="exec:/usr/local/karaf/data/tmp/test.sh"/>
</route>
在我的pom.xml中
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-exec</artifactId>
<version>${camel.version}</version>
</dependency>
org.apache.camel
骆驼执行官
${camel.version}
我们使用的是Camel版本2.15.3。我们用的是春驼。
有什么想法吗?这是其中一件必须如此简单的事情,它是非常令人沮丧的
顺便说一句,如果我使用
exec:/usr/…
或
exec:///usr/....
提前谢谢。我想好了。文档中没有提到这一点……至少在camel exec页面上没有提到
1:我得加一行
org.apache.camel.component.exec
到我的pom.xml中
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Spring-Context>*;create-asynchronously:=false</Spring-Context>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Import-Package>
...
org.apache.camel.component.exec
...
bundle:install mvn:org.apache.camel/camel-exec/2.15.3
bundle:install mvn:org.apache.commons/commons-exec/1.3
bundle:install mvn:commons-io/commons-io/1.4