当我在features:install camel-sql-orders
中运行命令ServiceMix
时给出错误
执行命令时出错:没有功能匹配camel-sql-orders / 0.0.0
请帮我解决这个问题
答案 0 :(得分:1)
ServiceMix中没有名为camel-sql-orders
的功能
karaf@root> features:list | grep sql
[uninstalled] [2.14.1 ] camel-josql camel-2.14.1
[uninstalled] [2.14.1 ] camel-sql camel-2.14.1
[uninstalled] [5.4.0 ] examples-camel-sql-derby servicemix-examples-5.4.0
[uninstalled] [5.4.0 ] examples-camel-sql-pgsql servicemix-examples-5.4.0
[uninstalled] [5.4.0 ] examples-camel-sql-h2 servicemix-examples-5.4.0
您应根据要使用的数据库安装其中一个examples-camel-sql-*
功能。这些功能包含camel-sql-orders
捆绑包
karaf@root> features:info examples-camel-sql-h2
Description of examples-camel-sql-h2 5.4.0 feature
----------------------------------------------------------------
Feature has no configuration
Feature has no configuration files
Feature depends on:
camel-sql 2.14.1
Feature contains followed bundles:
mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3
mvn:org.osgi/org.osgi.compendium/5.0.0
mvn:com.h2database/h2/1.3.170
mvn:org.apache.servicemix.examples/camel-sql-datasource-h2/5.4.0
mvn:org.apache.servicemix.examples/camel-sql-orders/5.4.0
Feature has no conditionals.
如果您不想使用这些功能中的任何一项,可以像今天https://github.com/apache/servicemix/blob/servicemix-5.4.x/assembly/src/main/filtered-resources/examples.xml#L59-L80
一样以类似方式创建自己的功能您也可以手动安装捆绑包(以及所有必需的依赖项)
features:install camel-sql
osgi:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3
osgi:install -s mvn:org.osgi/org.osgi.compendium/5.0.0
osgi:install -s mvn:com.h2database/h2/1.3.170
osgi:install -s mvn:org.apache.servicemix.examples/camel-sql-datasource-h2/5.4.0
osgi:install -s mvn:org.apache.servicemix.examples/camel-sql-orders/5.4.0