wasJmsClient-2.0与ejbLite-3.1不兼容

Pre*_*ari 1 websphere websphere-8 websphere-liberty

我想将现有代码从JMS1.1迁移到JMS 2.0.我正在使用Java 8通过WebSphere Liberty Profile 16.0部署应用程序.当我wasJmsClient-2.0在server.xml中启用功能时,我收到以下错误:

['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.
Run Code Online (Sandbox Code Playgroud)

我如何知道哪些功能兼容哪些功能不兼容?

And*_*ght 5

通常,当Java EE 6技术中的功能与Java EE 7中的功能混合时,WebSphere Liberty中的大多数功能不兼容问题都会出现.在您的示例中就是这种情况 - wasjmsClient-2.0是EE 7功能集的一部分,而ejbLite-3.1是EE 6功能集的一部分.您可以通过将功能ejbLite-3.1更改为ejbLite-3.2来解决功能不兼容问题.

如果要确定多个功能的兼容性,我知道有两种方法(两者都有点复杂......):1)检查wlp/lib/features目录中的功能清单文件,并查找子系统-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> 
Run Code Online (Sandbox Code Playgroud)

从那里你可以遵循依赖链并看到wasJmsClient-2.0依赖于transaction-1.2,但ejbLite-3.1依赖于transaction-1.1 - 并且这两个特性都不会容忍另一个版本.