【问题标题】:Issues with Apache ServiceMix and javax.transactionApache ServiceMix 和 javax.transaction 的问题
【发布时间】:2016-06-05 20:57:20
【问题描述】:

我遇到了 Apache ServiceMix (7.0.0.M1) 的问题。我启动了一个新的服务组合(干净)并简单地安装了事务功能:

karaf@root>feature:install transaction 

这会将 Aries 交易蓝图放入 GracePeriod:

224 | GracePeriod |  80 | 1.1.1                              | Apache Aries Transaction Blueprint 
225 | GracePeriod |  80 | 2.1.0                              | Apache Aries Transaction Blueprint 

这使我稍后安装的需要 javax 事务 api 的应用程序无法启动。这个问题有解决方法吗?仅使用 karaf 4.0.3 并尝试安装骆驼和交易时,我遇到了同样的问题。

您将在下面找到所有捆绑包的列表(基本服务组合 + 通过安装上面的交易功能添加的捆绑包)。请注意由于 GracePeriod 超时而导致的失败。

karaf@root>list 
START LEVEL 100 , List Threshold: 50 
 ID | State   | Lvl | Version                            | Name 
------------------------------------------------------------------------------------------------------- 
10 | Active  |  50 | 5.13.0                             | activemq-karaf 
11 | Active  |  50 | 2.6.3                              | Jackson-annotations 
12 | Active  |  50 | 2.6.3                              | Jackson-core 
13 | Active  |  50 | 2.6.3                              | jackson-databind 
23 | Active  |  50 | 3.1.4                              | activeio-core 
24 | Active  |  50 | 5.13.0                             | activemq-camel 
25 | Active  |  50 | 5.13.0                             | activemq-osgi 
40 | Active  |  50 | 2.16.2                             | camel-blueprint 
41 | Active  |  50 | 2.16.2                             | camel-catalog 
42 | Active  |  80 | 2.16.2                             | camel-commands-core 
43 | Active  |  50 | 2.16.2                             | camel-core 
44 | Active  |  50 | 2.16.2                             | camel-cxf 
45 | Active  |  50 | 2.16.2                             | camel-cxf-transport 
46 | Active  |  50 | 2.16.2                             | camel-jms 
47 | Active  |  50 | 2.16.2                             | camel-spring 
48 | Active  |  50 | 2.16.2                             | camel-xstream 
49 | Active  |  80 | 2.16.2                             | camel-karaf-commands 
51 | Active  |  50 | 3.2.2                              | Apache Commons Collections 
53 | Active  |  50 | 3.3.0                              | Commons Net 
54 | Active  |  50 | 1.6.0                              | Commons Pool 
55 | Active  |  50 | 2.4.2                              | Apache Commons Pool 
93 | Active  |  50 | 2.0.0                              | geronimo-j2ee-connector_1.5_spec 
94 | Active  |  50 | 1.0.1                              | geronimo-j2ee-management_1.1_spec 
99 | Active  |  50 | 3.4.6                              | ZooKeeper Bundle 
129 | Active  |  80 | 2.0.9                              | Apache MINA Core 
132 | Active  |  50 | 7.0.0.M1                           | Apache ServiceMix :: ActiveMQ :: Camel 
133 | Active  |  50 | 7.0.0.M1                           | Apache ServiceMix :: ActiveMQ :: Service 
136 | Active  |  50 | 1.6.1.5                            | Apache ServiceMix :: Bundles :: dom4j 
138 | Active  |  50 | 1.9.2.1                            | Apache ServiceMix :: Bundles :: jasypt 
142 | Active  |  50 | 1.1.0.4                            | Apache ServiceMix :: Bundles :: jdom 
143 | Active  |  50 | 2.3.0.2                            | Apache ServiceMix :: Bundles :: kxml2 
156 | Active  |  50 | 1.7.0.6                            | Apache ServiceMix :: Bundles :: velocity 
160 | Active  |  50 | 1.1.4.c                            | Apache ServiceMix :: Bundles :: xpp3 
161 | Active  |  50 | 1.4.8.1                            | Apache ServiceMix :: Bundles :: xstream 
172 | Active  |  50 | 3.18.0                             | Apache XBean :: Spring 
201 | Active  |  50 | 0.6.4                              | JAXB2 Basics - Runtime 
214 | Active  |  50 | 2.11.0.v20140415-163722-cac6383e66 | Scala Standard Library 
221 | Active  |  80 | 1.2.0                              | CDI APIs 
222 | Active  |  80 | 1.2                                | javax.interceptor API 
223 | Active  |  80 | 1.2                                | javax.transaction API 
224 | Failure |  80 | 1.1.1                              | Apache Aries Transaction Blueprint 
225 | Failure |  80 | 2.1.0                              | Apache Aries Transaction Blueprint
226 | Active  |  80 | 1.3.0                              | Apache Aries Transaction Manager 
227 | Active  |  80 | 1.0.2                              | Apache Felix Coordinator Service 
228 | Active  |  80 | 1.0.0.2                            | Apache ServiceMix :: Bundles :: javax.inject 

我也交叉发布到 apache 邮件列表。

【问题讨论】:

    标签: apache-karaf apache-servicemix aries


    【解决方案1】:

    问题在于 spring-tx 功能安装了 jta 1.1 规范包。 aries 事务包需要新的 jta 1.2 规范。所以他们没有找到绑定到错误规范版本的 TransactionManager。

    这是由 karaf spring-tx 功能中的错误引起的。该功能应依赖于依赖=true 的 jta 1.1 规范。这允许 karaf 解析器选择提供合适功能的不同包。

    我在KARAF-4358 中记录了这个问题。这些问题在 master 和 4.0.x 分支上得到解决。所以它将在 karaf 4.0.5 中交付。您可以像我一样通过编辑系统目录中的功能文件来修复您的 karaf 发行版。

    【讨论】:

      猜你喜欢
      • 2018-12-27
      • 2011-05-04
      • 1970-01-01
      • 2015-01-12
      • 1970-01-01
      • 2011-10-19
      • 1970-01-01
      • 2012-12-02
      • 1970-01-01
      相关资源
      最近更新 更多