[jboss-jira] [JBoss JIRA] (JBMETA-418) Validation error with "jboss-web_14_0.xsd"

Wolfgang Knauf (Jira) issues at jboss.org
Thu Jan 9 15:31:24 EST 2020


     [ https://issues.redhat.com/browse/JBMETA-418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wolfgang Knauf updated JBMETA-418:
----------------------------------
    Description: 
I build a "jboss-web.xml" file referencing jboss-web_14_0.xsd (bundled with WildFly 18), using Eclipse IDE:

{noformat}
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/schema/jbossas/jboss-web_14_0.xsd"
           version="14.0">
	<context-root>MyWebProject</context-root>

</jboss-web>
{noformat}

Eclipse shows validation errors deep in jboss_web_14_0.xsd.

Unfortunately, I can not copy from nested validation errors.
So I will attach a screenshot and type one of the error lines:
{noformat}
sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurences of 'http://xmlns.jcp.org/xml/ns/javaee,descriptionGroup'
{noformat}

The reason seems to be that "jboss-web_14_0.xsd" imports two files:
* "web-app_4_0.xsd" which imports "web-common_4_0.xsd" which imports "javaee_7.xsd".
* "jboss-common_8_0.xsd" which imports "javaee_8.xsd"

This is quite confusing, as the JavaEE8 standard has a lot of XSD files which import "javaee_7.xsd": [JavaEE schemas|https://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html#8]

It should work if "jboss-web_14_0.xsd" imports "jboss-common_7_1.xsd" and thus "javaee_7.xsd". I don't see any relevant differences beetween "jboss-common_7_1.xsd" and "jboss-common_8_0.xsd", so this should be possible. 


  was:
I build a "jboss-web.xml" file referencing jboss-web_14_0.xsd (bundled with WildFly 18), using Eclipse IDE:

{noformat}
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/schema/jbossas/jboss-web_14_0.xsd"
           version="14.0">
	<context-root>MyWebProject</context-root>

</jboss-web>
{noformat}

Eclipse shows validation errors deep in jboss_web_14_0.xsd.

Unfortunately, I can not copy from nested validation errors.
So I will attach a screenshot and type one of the error lines:
sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurences of 'http://xmlns.jcp.org/xml/ns/javaee,descriptionGroup'

The reason seems to be that "jboss-web_14_0.xsd" imports two files:
* "web-app_4_0.xsd" which imports "web-common_4_0.xsd" which imports "javaee_7.xsd".
* "jboss-common_8_0.xsd" which imports "javaee_8.xsd"

This is quite confusing, as the JavaEE8 standard has a lot of XSD files which import "javaee_7.xsd": [JavaEE schemas|https://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html#8]

It should work if "jboss-web_14_0.xsd" imports "jboss-common_7_1.xsd" and thus "javaee_7.xsd". I don't see any relevant differences beetween "jboss-common_7_1.xsd" and "jboss-common_8_0.xsd", so this should be possible. 




> Validation error with "jboss-web_14_0.xsd"
> ------------------------------------------
>
>                 Key: JBMETA-418
>                 URL: https://issues.redhat.com/browse/JBMETA-418
>             Project: JBoss Metadata
>          Issue Type: Bug
>          Components: web
>    Affects Versions: 12.0.0.Final
>            Reporter: Wolfgang Knauf
>            Assignee: Jean-Frederic Clere
>            Priority: Major
>         Attachments: validationerror.png
>
>
> I build a "jboss-web.xml" file referencing jboss-web_14_0.xsd (bundled with WildFly 18), using Eclipse IDE:
> {noformat}
> <?xml version="1.0" encoding="UTF-8"?>
> <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
>            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>            xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/schema/jbossas/jboss-web_14_0.xsd"
>            version="14.0">
> 	<context-root>MyWebProject</context-root>
> </jboss-web>
> {noformat}
> Eclipse shows validation errors deep in jboss_web_14_0.xsd.
> Unfortunately, I can not copy from nested validation errors.
> So I will attach a screenshot and type one of the error lines:
> {noformat}
> sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurences of 'http://xmlns.jcp.org/xml/ns/javaee,descriptionGroup'
> {noformat}
> The reason seems to be that "jboss-web_14_0.xsd" imports two files:
> * "web-app_4_0.xsd" which imports "web-common_4_0.xsd" which imports "javaee_7.xsd".
> * "jboss-common_8_0.xsd" which imports "javaee_8.xsd"
> This is quite confusing, as the JavaEE8 standard has a lot of XSD files which import "javaee_7.xsd": [JavaEE schemas|https://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html#8]
> It should work if "jboss-web_14_0.xsd" imports "jboss-common_7_1.xsd" and thus "javaee_7.xsd". I don't see any relevant differences beetween "jboss-common_7_1.xsd" and "jboss-common_8_0.xsd", so this should be possible. 



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list