[jboss-jira] [JBoss JIRA] (JBMETA-363) Validation errors with "jboss-web_7_0.xsd
ehsavoie Hugonnet (JIRA)
issues at jboss.org
Mon Sep 24 11:04:00 EDT 2018
[ https://issues.jboss.org/browse/JBMETA-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ehsavoie Hugonnet resolved JBMETA-363.
--------------------------------------
Fix Version/s: 12.0.0.Final
Resolution: Done
> Validation errors with "jboss-web_7_0.xsd
> -----------------------------------------
>
> Key: JBMETA-363
> URL: https://issues.jboss.org/browse/JBMETA-363
> Project: JBoss Metadata
> Issue Type: Bug
> Components: web
> Affects Versions: 7.0.5.Final, 8.1.2.Final
> Environment: Eclipse
> Reporter: Wolfgang Knauf
> Assignee: Jean-Frederic Clere
> Fix For: 12.0.0.Final
>
>
> I tried to create a "jboss-web.xml" file based on the "jboss-web_7_1.xsd"
> As this is not uploaded to the web up to now, I created it with a schema location pointing to my local JBoss 7.2.0Alpha1 snapshot:
> <?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 file:///C:/Temp/jboss-as-7.2.0.Alpha1-SNAPSHOT/docs/schema/jboss-web_7_0.xsd"
> version="7.0">
> ...
> </jboss-web>
> Eclipse shows validation errors in the XSD file.
> The first on is:
> sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two
> occurences of 'http://java.sun.com/xml/ns/javaee,descriptionGroup'
> (occurs in javaee_6.xsd, line 88)
> And a lot more of those.
> The file was created as part of https://issues.jboss.org/browse/AS7-1262 - and the one who created it found the same validation error.
> It seems the fix is quite simple:
> "jboss-web_7_0.xsd" contains this import:
> <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="web-app_3_0.xsd"/>
> Change it to:
> <xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"/>
> The reason seems to be: "jboss-web_7_0.xsd" imports "jboss-common_6-0.xsd", and this one imports "javaee_6.xsd" with a full schema location.
> The "web-app_3_0.xsd" in "jboss-web_7_0.xsd" has a local schema location, thus the "javaee_6.xsd" import in "web-app_3_0.xsd" points also to local.
> And this seems to cause a duplicate import of the file.
> (might also be an Eclipse valiation bug)
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list