【问题标题】:wasJmsClient-2.0 is not compatible to ejbLite-3.1wasJmsClient-2.0 与 ejbLite-3.1 不兼容
【发布时间】:2017-03-06 16:56:33
【问题描述】:
我想将现有代码从 JMS1.1 迁移到 JMS 2.0。我正在使用 Java 8 通过 WebSphere Liberty Profile 16.0 部署应用程序。当我在 server.xml 中启用 wasJmsClient-2.0 功能时,出现以下错误:
['wasJmsClient-2.0' --> 'com.ibm.websphere.appserver.internal.jms-2.0' --> 'com.ibm.websphere.appserver.javax.connector.internal-1.7'] and ['ejbLite-3.1' --> 'com.ibm.websphere.appserver.transaction-1.1' -->
'com.ibm.websphere.appserver.javax.connector.internal-1.6'] features are in conflict. Select a compatible set of features.
我如何知道哪些功能兼容哪些不兼容?
【问题讨论】:
标签:
websphere
websphere-liberty
websphere-8
【解决方案1】:
一般来说,WebSphere Liberty 中的大多数功能不兼容问题都是在将 Java EE 6 技术的功能与 Java EE 7 的功能混合时出现的。您的示例就是这种情况 - wasJmsClient-2.0 是 EE 7 功能集的一部分,而ejbLite-3.1 是 EE 6 功能集的一部分。您可以通过将功能 ejbLite-3.1 更改为 ejbLite-3.2 来解决功能不兼容问题。
如果您想确定多个功能的兼容性,我知道有两种方法(两者都有些复杂......):
1) 检查 wlp/lib/features 目录中的功能清单文件,并查找 Subsystem-Content 标头 - 特别是“osgi.subsystem.feature”类型的条目。这些是功能的依赖项——其中一些会声明它们可以使用特定功能的不同版本。其他的更严格。
2) 运行“wlp/bin/featureManager featureList myFeatureList.xml”。这将生成一个 XML 文件,该文件将提供与功能清单相同的信息,但采用可能更易于阅读的 XML 格式。它将像这样显示依赖项:
<feature name="wasJmsClient-2.0">
<symbolicName>com.ibm.websphere.appserver.wasJmsClient-2.0</symbolicName>
<singleton>true</singleton>
<displayName>JMS 2.0 Client for Message Server</displayName>
<!-- ... -->
<include symbolicName="com.ibm.websphere.appserver.channelfw-1.0"></include>
<include symbolicName="com.ibm.websphere.appserver.transaction-1.2"></include>
<include symbolicName="com.ibm.websphere.appserver.internal.jms-2.0"></include>
</feature>
从那里您可以跟踪依赖链并看到 wasJmsClient-2.0 依赖于 transaction-1.2,但 ejbLite-3.1 依赖于 transaction-1.1 - 并且这两个功能都不能容忍其他版本。
【解决方案2】:
JMS 2.0 和 EJB 3.1 处于不同的 Java EE 规范级别。尝试从 ejbLite-3.1 切换到 ejbLite-3.2(并更新您的服务器配置中的任何其他功能以完全匹配 EE 7 规范级别)。