Apache Camel 2.15.2无法创建码头实例 [英] Apache Camel 2.15.2 not able to create jetty instance

查看:160
本文介绍了Apache Camel 2.15.2无法创建码头实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用2.14版本的骆驼时,我能够创建码头实例...但是,当tomcat加载应用程序时,2.15.2给出了以下错误

When I was using 2.14 version of camel, I was able to get jetty instance created... however 2.15.2 is giving below error while tomcat loads the app

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jetty' defined in ServletContext resource [/WEB-INF/classes/camel-context.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.camel.component.jetty.JettyHttpComponent]: Is it an abstract class?; nested exception is java.lang.InstantiationException

这是我的骆驼上下文配置的样子

Here is how my camel context config looks like

bean id="jetty" class="org.apache.camel.component.jetty.JettyHttpComponent"

推荐答案

自骆驼2.15开始,Jetty组件已分派到两个组件camel-jetty8camel-jetty9中. camel-jetty,仅包含您无法实例化的抽象类.

Since Camel 2.15, Jetty component has been dispatched in two components camel-jetty8 and camel-jetty9. camel-jetty, only contains an abstract class that you cannot instantiate.

导入camel-jetty8camel-jetty9后,您只需替换行即可:

After importing camel-jetty8 or camel-jetty9, you can simply replace your line:

bean id="jetty" class="org.apache.camel.component.jetty.JettyHttpComponent"

作者

bean id="jetty" class="org.apache.camel.component.jetty8.JettyHttpComponent8"

bean id="jetty" class="org.apache.camel.component.jetty9.JettyHttpComponent9"

这篇关于Apache Camel 2.15.2无法创建码头实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆