从 6.1.0 升级到 ServiceMix 7.0.0M2 在 JettyHttpComponent8 上抛出空指针异常

Upgrading to ServiceMix 7.0.0M2 from 6.1.0 throwing null pointer exception on JettyHttpComponent8

6.1.0 升级到 Servicemix 7.0.0M2 时,我从我的一个包中得到以下异常。

2016-07-04 11:03:39,725 | ERROR | -7.0.0.M2/deploy | BlueprintCamelContext            | 41 - org.apache.camel.camel-blueprint - 2.16.3 | Error occurred during starting Camel: CamelContext(camel-1) due null
java.lang.NullPointerException
        at org.apache.camel.component.jetty8.JettyHttpComponent8.createConnectorJettyInternal(JettyHttpComponent8.java:48)[232:org.apache.camel.camel-jetty8:2.16.3]
        at org.apache.camel.component.jetty.JettyHttpComponent.createConnector(JettyHttpComponent.java:577)[231:org.apache.camel.camel-jetty-common:2.16.3]
        at org.apache.camel.component.jetty.JettyHttpComponent.getSocketConnector(JettyHttpComponent.java:520)[231:org.apache.camel.camel-jetty-common:2.16.3]
        at org.apache.camel.component.jetty.JettyHttpComponent.getConnector(JettyHttpComponent.java:510)[231:org.apache.camel.camel-jetty-common:2.16.3]
        at org.apache.camel.component.jetty.JettyHttpComponent.connect(JettyHttpComponent.java:298)[231:org.apache.camel.camel-jetty-common:2.16.3]
        at org.apache.camel.http.common.HttpCommonEndpoint.connect(HttpCommonEndpoint.java:116)[228:org.apache.camel.camel-http-common:2.16.3]
        at org.apache.camel.http.common.HttpConsumer.doStart(HttpConsumer.java:50)[228:org.apache.camel.camel-http-common:2.16.3]
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3234)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRouteConsumers(DefaultCamelContext.java:3528)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.doStartRouteConsumers(DefaultCamelContext.java:3464)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3394)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3162)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3018)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.access[=10=]0(DefaultCamelContext.java:175)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.call(DefaultCamelContext.java:2814)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.call(DefaultCamelContext.java:2810)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2833)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2810)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2779)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.blueprint.BlueprintCamelContext.start(BlueprintCamelContext.java:180)[41:org.apache.camel.camel-blueprint:2.16.3]
        at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:212)[41:org.apache.camel.camel-blueprint:2.16.3]
        at org.apache.camel.blueprint.BlueprintCamelContext.serviceChanged(BlueprintCamelContext.java:150)[41:org.apache.camel.camel-blueprint:2.16.3]
        at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.Felix.registerService(Felix.java:3549)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:492)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:422)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:276)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:300)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:269)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:265)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:255)[29:org.apache.aries.blueprint.core:1.6.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[40:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[40:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[40:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[40:org.apache.aries.util:1.1.1]
        at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[40:org.apache.aries.util:1.1.1]
        at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:731)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:486)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)[org.apache.felix.framework-5.4.0.jar:]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)[org.apache.felix.framework-5.4.0.jar:]

相同的 pom.xml6.1.0 上运行良好,只是在移动到 7.0.0M2 时我将 camel.version2.16.1 更改为 2.16.3 ] 和 jackson.versionjackson.afterburner.version2.6.22.7.5

谁能告诉我出了什么问题?从 6.1.0 转到 7.0.0M2 时,我还需要更改其他任何内容吗?

修改我的 pom.xmlfeature.xml 以使用 camel-jetty9 解决了这个问题。

我在 pom.xml

中进行了以下更改
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-jetty9</artifactId>
  <version>${camel.version}</version>
  <scope>provided</scope>
</dependency>

feature.xml 中也有以下变化:-

<feature version="${camel.version}">camel-jetty9</feature>

其中 <camel.version>2.16.3</camel.version>

骆驼版本是 2.16.3 我也不得不卸载骆驼码头。只有 camel-jetty9 似乎有效。

feature:uninstall camel-jetty/2.16.3