简体   繁体   English

JMS与ServiceMix中的Apache骆驼生成错误

[英]JMS with apache camel in ServiceMix generates an error

I've got a problem with JMS access in spring, I try to configure JMS consumer and get an error: 我在春季遇到JMS访问问题,我尝试配置JMS使用者并收到错误消息:

Class org.springframework.core.task.SimpleAsyncTaskExecutor does not implement the requested interface java.util.concurrent.Executor org.springframework.core.task.SimpleAsyncTaskExecutor类未实现所请求的接口java.util.concurrent.Executor

Does any one know how to solve this, or what this really means? 有谁知道如何解决这个问题,或者这到底意味着什么? I'm using Camel 2.4 and am deploying my service to ServiceMix 3.3. 我正在使用Camel 2.4,并将我的服务部署到ServiceMix 3.3。

I am assuming you are using Spring 2.x. 我假设您正在使用Spring2.x。

It seems that Spring 2.x SimpleAsyncTaskExecutor does not implement the Java core Executor interface. 看来Spring 2.x SimpleAsyncTaskExecutor没有实现Java核心Executor接口。 To resolve this, you have 2 options I can think of right off the bat: 要解决此问题,您可以立即想到两种选择:

  1. Upgrade to Spring 3.x. 升级到Spring3.x。 That version of SimpleAsyncTaskExecutor does implement the Executor interface. 该版本的SimpleAsyncTaskExecutor确实实现了Executor接口。
  2. Use a different Executor implementation. 使用其他执行器实现。 Java core has the built in ThreadPoolExecutor , or you can use the ExecutorService to construct a variety of different configurations of the same. Java核心具有内置的ThreadPoolExecutor ,或者您可以使用ExecutorService来构造相同的各种不同配置。

Hope that helps. 希望能有所帮助。

//Nicholas //尼古拉斯

You could maybe recompile camel-jms using spring 2.5 which oddly may help. 您也许可以使用spring 2.5重新编译camel-jms,这可能会有所帮助。 Check camel building source docu as there is a maven profile to use spring 2.5. 检查骆驼建筑源文档,因为有一个使用Maven 2.5的Maven配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM