Error: Projects containing version <unknown> deployment descriptors require XMI-format bindings or extensions files. ibm-web-bnd.xml
Asked Answered
A

2

8

I have upgraded editor from Rad 7.5 to 8 and maven 2 to 3. This happens just after importing existing maven projects in RAD 8, but I have no errors on any pom files.

The issue is with two xml files :

Projects containing version deployment descriptors require XMI-format bindings or extensions files. ibm-web-bnd.xml /DocViewerWeb/WebContent/WEB-INF Unknown Validation Message

Projects containing version deployment descriptors require XMI-format bindings or extensions files. ibm-web-ext.xml /DocViewerWeb/WebContent/WEB-INF Unknown Validation Message

Contents of those two files are:

<?xml version="1.0" encoding="UTF-8"?>
<web-bnd 
    xmlns="http://websphere.ibm.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_0.xsd"
    version="1.0">

    <virtual-host name="default_host" />

  <ejb-ref name="ejb/MaintenanceServices" binding-name="ejblocal:com.tscdv.document.b.MaintenanceServices" />
  <ejb-ref name="ejb/ServiceTipsDocumentServices" binding-name="ejblocal:com.tscdv.document.b.ServiceTipsDocumentServices" />
  <ejb-ref name="ejb/ActivityDocumentServices" binding-name="ejblocal:com.tscdv.document.b.ActivityDocumentServices" />
  <ejb-ref name="ejb/BulletinDocumentServices" binding-name="ejblocal:com.tscdv.document.b.BulletinDocumentServices" />
  <ejb-ref name="ejb/CommonService" binding-name="ejblocal:com.tscdv.document.b.CommonService" />
  <ejb-ref name="ejb/AdminServices" binding-name="ejblocal:com.tscdv.document.b.AdminServices" />

</web-bnd>

and

<?xml version="1.0" encoding="UTF-8"?>
<web-ext
    xmlns="http://websphere.ibm.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
    version="1.0">

    <reload-interval value="3"/>
    <context-root uri="DocViewerWeb" />
    <enable-directory-browsing value="true"/>
    <enable-file-serving value="true"/>
    <enable-reloading value="true"/>
    <enable-serving-servlets-by-class-name value="true" />

</web-ext>

What could be the problem here?

I have posted another possibly related issue: JSR250: CommonAnnotations for Java, 2.3: @Resource methods must be setters that follow the standard JavaBeans convention

Amidst answered 20/4, 2012 at 9:19 Comment(0)
H
11

Projects containing web.xml with version="2.4" or lower require ibm-web-bnd.xmi and ibm-web-ext.xmi.

Projects containing web.xml with version="2.5" or higher require ibm-web-bnd.xml and ibm-web-ext.xml.

Perhaps the change in tool versions has upgraded your web.xml version to 2.5, and now RAD is warning that this is incompatible with your web.xml?

Highbred answered 21/4, 2012 at 13:34 Comment(3)
Yes, the root of the problem above is that the web.xml is still referencing 2.4 and needs to be changed to 2.5. The fix is easy, remove the 2.4 desciptor and replace with the following: <?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" xmlns="java.sun.com/xml/ns/javaee" xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:schemaLocation="java.sun.com/xml/ns/javaee java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> If the project has any .xmi files they should be removed and the equivalent settings added to the new xml versions of the files.Maul
I have 2.5 and xml files and everything checks out. I got the error after changing the context root. Any ideas?Therewithal
@Therewithal I recommend opening a new question rather than commenting on this old answer. I've not been active with WebSphere for several years, so I don't have any ideas, sorry.Highbred
M
2

In extension to the comment on bkail's answer (which is helpful) if you want to use web.xml version 2.5 you should use the following prolog and parent node. Technically the comment is inaccurate as the namespaces are missing http:// and will cause additional errors if you do not use this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
  version="2.5">
Mohawk answered 7/5, 2015 at 16:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.