Apache ServiceMix 7,ScalaDSL,未找到具有方案的组件:jetty

Apache ServiceMix 7, ScalaDSL, No component found with scheme: jetty

我使用 Scala 创建了一个非常基本的包,用于 Camel 和 Karaf。当我在 Apache ServiceMix 7.0.0 / Karaf 中安装我的捆绑包时,该捆绑包将解析但不会启动。当我检查日志时,我收到消息:没有找到方案的组件:jetty

彻底搜索此问题只会得到有关确保 pom.xml.

中包含 camel-jetty 的答案

我已经这样做了,但不幸的是它仍然无法正常工作..

我的 Pom 依赖项是(除其他外):

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jetty-common</artifactId>
      <version>2.16.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jetty9</artifactId>
      <version>2.16.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-jetty</artifactId>
      <version>2.16.3</version>
    </dependency>

Scala 中的代码非常基础:

   val netStart = "jetty:http://localhost:8882/userdata"
   val netEnd = "file:scala/netoutput"

   netStart ==> {
    as (classOf[Person])
    to (netEnd)
   }

最后在 Karaf Web 控制台中显示的引用组件列表是

Imported Packages   com.fasterxml.jackson.databind,version=2.8.2 from com.fasterxml.jackson.core.jackson-databind (268)
com.fasterxml.jackson.module.scala,version=2.8.2 from com.fasterxml.jackson.module.jackson.module.scala (246)
org.apache.camel,version=2.16.3 from org.apache.camel.camel-core (43)
org.apache.camel.builder,version=2.16.3 from org.apache.camel.camel-core (43)
org.apache.camel.component.jetty,version=2.16.3 from org.apache.camel.camel-jetty-common (270)
org.apache.camel.component.jetty9,version=2.16.3 from org.apache.camel.camel-jetty9 (271)
org.apache.camel.main,version=2.16.3 from org.apache.camel.camel-core (43)
org.apache.camel.scala.dsl,version=2.16.3 from org.apache.camel.camel-scala (220)
org.apache.camel.scala.dsl.builder,version=2.16.3 from org.apache.camel.camel-scala (220)
org.apache.camel.spi,version=2.16.3 from org.apache.camel.camel-core (43)
org.apache.camel.support,version=2.16.3 from org.apache.camel.camel-core (43)
org.osgi.framework,version=1.8.0 from org.apache.felix.framework (0)
scala,version=2.11.7.v20150622-112736-1fbce4612c from org.scala-lang.scala-library (213)
scala.collection,version=2.11.7.v20150622-112736-1fbce4612c from org.scala-lang.scala-library (213)
scala.collection.mutable,version=2.11.7.v20150622-112736-1fbce4612c from org.scala-lang.scala-library (213)
scala.reflect,version=2.11.7.v20150622-112736-1fbce4612c from org.scala-lang.scala-library (213)
scala.runtime,version=2.11.7.v20150622-112736-1fbce4612c from org.scala-lang.scala-library (213)
Manifest Headers    Bnd-LastModified: 1474031034895
Build-Jdk: 1.8.0_91
Built-By: sander
Bundle-Activator: com.focuscura.servicemix.spielerei.MyRouteMain
Bundle-ManifestVersion: 2
Bundle-Name: MyFirstDSL
Bundle-SymbolicName: com.focuscura.servicemix.spielerei.my-first-dsl
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: Apache Maven Bundle Plugin
Export-Package: com.focuscura.servicemix.spielerei; uses:="com.fasterxml.jackson.databind, org.apache.camel, org.apache.camel.builder, org.apache.camel.component.jetty, org.apache.camel.component.jetty9, org.apache.camel.scala.dsl.builder, org.apache.camel.support, org.osgi.framework, scala, scala.collection, scala.reflect, scala.runtime"; version="1.0.0"
Import-Package: com.fasterxml.jackson.databind; version="[2.8, 3)", com.fasterxml.jackson.module.scala; version="[2.8, 3)", org.apache.camel; version="[2.16, 3)", org.apache.camel.builder; version="[2.16, 3)", org.apache.camel.component.jetty; version="[2.16, 3)", org.apache.camel.component.jetty9; version="[2.16, 3)", org.apache.camel.main; version="[2.16, 3)", org.apache.camel.scala.dsl; version="[2.16, 3)", org.apache.camel.scala.dsl.builder; version="[2.16, 3)", org.apache.camel.spi; version="[2.16, 3)", org.apache.camel.support; version="[2.16, 3)", org.osgi.framework; version="[1.8, 2)", scala; version="[2.11, 3)", scala.collection; version="[2.11, 3)", scala.collection.mutable; version="[2.11, 3)", scala.reflect; version="[2.11, 3)", scala.runtime; version="[2.11, 3)"
Manifest-Version: 1.0
Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=1.6))"
Tool: Bnd-3.0.0.201509101326

我已经安装了 camel-jetty9 功能,作为测试,我在 xml 中创建了一条蓝图路线,它也使用码头路线并且工作正常。

关于为什么 ServiceMix / Karaf / Camel 一直坚持找不到的任何帮助 jetty:html:?

非常感谢!

我们遇到了类似的问题,这是由 Camel 版本和 Jetty 版本无法协同工作引起的。 Camel 尚未更新为可与 Jetty 9 一起使用,仅可与 Jetty 8 一起使用。

如果您回滚到 Service Mix 6。1.x 那么您可能会发现问题会自行解决,就像我们的情况一样。

有关版本控制的详细信息,请参阅 http://servicemix.apache.org/community/releases-schedule.html

编辑:Camel 2.18 将解决这些问题,但 Service Mix 7 仅使用 2.16

来源:https://issues.apache.org/jira/browse/CAMEL-9689