[英]How to correctly refactor ibm-ejb-jar-bnd.xmi file while doing app migration from WebSphere Application Server traditional to Liberty?
I am facing an error while doing app migration from WebSphere Application Server traditional v9.0.0.7 to Liberty base v18.0.0.1 从WebSphere Application Server传统v9.0.0.7迁移到Liberty基本v18.0.0.1的应用程序迁移时遇到错误
An exceptions in console says: 控制台中的一个例外说明:
...
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.
...
It seems like there is an issue with EJB binding. EJB绑定似乎有问题。 I have been reading that Liberty doesn't support WAS 9 EJBs binding and only binds EJBs to the java : namespace syntax.
我一直在阅读Liberty不支持WAS 9 EJB绑定,而仅将EJB绑定到java:名称空间语法。
ibm-ejb-jar-bnd.xmi file looks like: 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>
How exactly should I refactor the ibm-ejb-jar-bnd.xmi file? 我应该如何精确重构ibm-ejb-jar-bnd.xmi文件? Please help me to sort out the issue.
请帮助我解决问题。
The message is a little confusing because the same parser is used for both versions of the binding file; 该消息有些混乱,因为绑定文件的两个版本都使用相同的解析器。 the old one,
ibm-ejb-jar-bnd.xmi
, and the new one, ibm-ejb-jar-bnd.xml
. 旧的
ibm-ejb-jar-bnd.xmi
和新的ibm-ejb-jar-bnd.xml
。 The name
attribute as defined in the newer format (XML) is a calculated value in the older format (XMI), and is determined by processing this line: 以较新的格式(XML)定义的
name
属性是较旧的格式(XMI)的计算值,并通过处理以下行来确定:
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#UtilitySession"/>
Specifically, the parser will follow the href
and look for the ejb-name
element of the corresponding EJB. 具体来说,解析器将遵循
href
并查找相应EJB的ejb-name
元素。 You should look in your ejb-jar.xml
for a corresponding entry like this: 您应该在
ejb-jar.xml
查找相应的条目,如下所示:
<session id="UtilitySession">
Either that is missing, or possibly there are multiple occurrences. 要么丢失,要么可能多次出现。 Or, it is missing an
ejb-name
element. 或者,它缺少
ejb-name
元素。
Note: the newer XML
format is supported in ejb-jar.xml
files at level 3.0 or newer and the XMI
format is supported in all prior levels of ejb-jar.xml
注:较新的
XML
格式支持的ejb-jar.xml
的文件在3.0级或更高版本和XMI
格式在以前的所有级别支持ejb-jar.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.