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

时间:2016-07-04 06:45:09

标签: apache-camel apache-servicemix

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

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$000(DefaultCamelContext.java:175)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2814)[44:org.apache.camel.camel-core:2.16.3]
        at org.apache.camel.impl.DefaultCamelContext$2.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.xmlhere
  • feature.xmlhere

相同的pom.xml6.1.0上工作正常,只是在转移到7.0.0M2时我将camel.version更改为2.16.32.16.1来自jackson.version的{​​{1}}和jackson.afterburner.version2.7.5

有人能让我知道出了什么问题吗?从2.6.2搬到7.0.0M2时,我是否需要更改其他内容?

2 个答案:

答案 0 :(得分:1)

修改我的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>

答案 1 :(得分:1)

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

feature:uninstall camel-jetty/2.16.3