简体   繁体   English

在将应用程序从传统的WebSphere Application Server迁移到Liberty时,如何正确重构ibm-ejb-jar-bnd.xmi文件?

[英]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.

相关问题 使用Websphere Libertyty应用程序从经典Websphere应用程序访问远程ejb - Accessing remote ejb from classic websphere application with websphere liberty application @Resource上的lookup属性是否替代了ibm-ejb-jar-bnd.xml? - Is the lookup attribute on @Resource a replacement for ibm-ejb-jar-bnd.xml? 如何在WebSphere Liberty中使用JNDI查找EJB - How to lookup EJB using JNDI in WebSphere Liberty 将EJB应用程序从WebSphere Classic迁移到Liberty需要ejblite-3.1 - Migrating EJB application from WebSphere Classic to Liberty Requires ejblite-3.1 在IBM WebSphere Application Server Community Edition中安装新的war文件时,部署失败 - Deployment failed while installing a new war file in IBM WebSphere Application Server Community edition 如何将Angular与Liberty WebSphere Server一起使用 - How to use Angular with Liberty WebSphere Server 来自IBM WebSphere Application Server上的WebJars的静态资源不可见 - Static resources from WebJars on IBM WebSphere Application Server not visible WebSphere Application Server 6.1的EJB查找问题 - EJB Lookup Issue with WebSphere Application Server 6.1 尝试在WebSphere Liberty 8.5.5.8中绑定EJB时出错 - Error Attempting to Bind EJB in WebSphere Liberty 8.5.5.8 Websphere Application Server从轴jar调用类 - Websphere Application Server calls classes from axis jar
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM