【发布时间】:2018-12-01 06:38:48
【问题描述】:
我在将应用程序从 WebSphere Application Server 传统 v9.0.0.7 迁移到 Liberty base v18.0.0.1 时遇到错误
控制台中的异常说:
...
CWWKZ0002E: An exception occurred while starting the application AP. The exception message was: com.ibm.ws.container.service.metadata.MetaDataException: com.ibm.wsspi.adaptable.module.UnableToAdaptException: com.ibm.ejs.container.EJBConfigurationException: com.ibm.wsspi.adaptable.module.UnableToAdaptException: com.ibm.ws.javaee.ddmodel.DDParser$ParseException:
CWWKC2251E: The ejbBindings element is missing the required name attribute in the /META-INF/ibm-ejb-jar-bnd.xmi deployment descriptor on line 9.
...
EJB 绑定似乎存在问题。 我一直在阅读 Liberty 不支持 WAS 9 EJB 绑定,仅将 EJB 绑定到 java : namespace 语法。
ibm-ejb-jar-bnd.xmi 文件看起来像:
<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejb="ejb.xmi" xmlns:ejbbnd="ejbbnd.xmi" xmi:id="EJBJarBinding_1090575365340">
<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
<ejbBindings xmi:id="EnterpriseBeanBinding_1090575365340" jndiName="ejb/com/ap/ejb/AccountSessionHome">
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#AccountSession"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1047783791228" jndiName="ejb/com/ap/ejb/UtilitySessionHome">
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#UtilitySession"/>
</ejbBindings>
</ejbbnd:EJBJarBinding>
我应该如何重构 ibm-ejb-jar-bnd.xmi 文件? 请帮我解决问题。
【问题讨论】:
-
如果您不了解此工具,我建议您使用 WebSphere 迁移工具包在从 websphere 传统迁移到 Liberty 期间标记此类问题。它会标记您在迁移过程中可能遇到的问题,并提供一些帮助/文档。这是扫描您的源代码并可以提供一些快速修复的工具(developer.ibm.com/wasdev/downloads/#asset/…),这是扫描二进制文件的二进制扫描程序(developer.ibm.com/wasdev/downloads/#asset/…)。
标签: jakarta-ee ejb websphere websphere-liberty open-liberty