当我在 ServiceMix
中运行命令 features:install camel-sql-orders
时出现错误
Error executing command: No feature matching camel-sql-orders/0.0.0
请帮我解决这个问题
最佳答案
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
您也可以手动安装 bundle (以及所有必要的依赖项)
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
关于java - "Error executing command: No feature matching camel-sql-orders/0.0.0",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28711274/