Uploaded image for project: 'JBoss Metadata'
  1. JBoss Metadata
  2. JBMETA-456

Eclipse validation errors in "jboss-app.xml" with schema version 9

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None
    • False
    • None
    • False
    • Untriaged

      Take this "jboss-app.xml" file that works with WildFly 31:

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-app xmlns="urn:jboss:jakartaee:1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="urn:jboss:jakartaee:1.0 https://www.jboss.org/schema/jbossas/jboss-app_9_0.xsd"
          version="9">
        <security-domain>security-domain</security-domain>
      </jboss-app> 

       

      Eclipse reports validation errors :

       

      cvc-complex-type.2.4.a: Invalid content was found starting with element '{"urn:jboss:jakartaee:1.0":security-domain}'. One of '{"https://jakarta.ee/xml/ns/jakartaee":application-name, "https://jakarta.ee/xml/ns/jakartaee":description, "https://jakarta.ee/xml/ns/jakartaee":display-name, "https://jakarta.ee/xml/ns/jakartaee":icon, "https://jakarta.ee/xml/ns/jakartaee":initialize-in-order, "https://jakarta.ee/xml/ns/jakartaee":module}' is expected.
      cvc-complex-type.3.1: Value '9' of attribute 'version' of element 'jboss-app' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '10'.

       

      This seems to be caused by the fact that "jboss-app_9_0.xsd" defines the type "jboss-appType" as an extension of "jakartaee:applicationType". Somehow, this does not validate, but I don't know why .

      Other files like "jboss-web_15_0.xsd", where a "jboss-web.xml" validates in Eclipse, don't extend the JakartaEE root type, but declare all elements themself.

       

      Attached is a modified "jboss-app.xsd" which does not show the validation errors:

      jboss-app_9_0.xsd

      Same workaround seems to be necessary for "moduleType" (which probably should duplicate the content of the base type).

       

      If you confirm this change, I could do a pull request. But I would require a lot of guidance.

       

       

              Unassigned Unassigned
              wolfgangknauf Wolfgang Knauf
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: