Bug 1290856

Summary: Upstream ASF Bug 31313 - missing / on xsi:schemaLocation
Product: Red Hat Enterprise Linux 6 Reporter: Coty Sutherland <csutherl>
Component: jakarta-taglibs-standardAssignee: Michael Simacek <msimacek>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: high Docs Contact:
Priority: high    
Version: 6.8CC: bgollahe, bnater, cww, kwalker, mdshaikh, mizdebsk, msimacek, msrb, thozza
Target Milestone: rcKeywords: EasyFix, Reopened
Target Release: 6.9   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: jakarta-taglibs-standard-1.1.1-11.8.el6 Doc Type: Bug Fix
Doc Text:
Cause: Invalid XML schema location in taglib declaration files. Consequence: Validation of taglib declarations failed, which caused failed deployments of tomcat apps in STRICT_SERVLET_COMPLIANCE mode. Fix: Schema location declaration was fixed to point at the correct document. Result: Validation errors are no longer present. Tomcat app deployments with STRICT_SERVLET_COMPLIANCE=true no longer fail on XML validation of the taglib.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-19 05:15:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1134600, 1374441, 1461138, 1494483    
Attachments:
Description Flags
asf rev patch none

Description Coty Sutherland 2015-12-11 16:48:30 UTC
Created attachment 1104748 [details]
asf rev patch

Description of problem:
In working on resolving the XML validation bug for tomcat6 (rhbz-1134600) it was discovered that the XML prolog of the TLDs contained in the standard.jar provided by the jakarta-taglibs-standard package are invalid. When using XML validation with the tomcat6 fix in place, the following error is observed:
+++
INFO: Deploying web application directory examples
Dec 11, 2015 11:40:56 AM org.apache.tomcat.util.digester.Digester warning
WARNING: Parse Warning Error at line 6 column 19: schema_reference.4: Failed to read schema document 'web-jsptaglibrary_2_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 19; schema_reference.4: Failed to read schema document 'web-jsptaglibrary_2_0.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2450)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1766)
....
+++

Version-Release number of selected component (if applicable):
jakarta-taglibs-standard-1.1.1-11.7.el6_7.noarch

How reproducible:
Every time with the fix for rhbz-1134600 in place. Note, that fix has _not_ been released yet.

Steps to Reproduce:
1. Follow steps in rhbz-1134600
2. start tomcat6 service
3. observe errors in /var/log/tomcat6/catalina.out

Actual results:
Errors noted in description.

Expected results:
No errors :)

Additional info:
I attached the BZ that resolved the issue, note the revision below, and provided a patch of the revision.
+++
------------------------------------------------------------------------
r218346 | horwat | 2004-10-18 13:17:41 -0400 (Mon, 18 Oct 2004) | 13 lines

Bugzilla #31313
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=31313

According to the W3C document the schemaLocation declaration is made up of a pair of URI references. One defines the namespace name and the other is a hint as to the location of the schema document. The space in the schemaLocation definition separates the two declarations.

For a complete explanation you can take a look at part 3 of:

http://www.w3.org/TR/xmlschema-1/#schema-loc

In the JSTL case the location is not an absolute URI which can be confusing especially to some IDE's. I went ahead and changed it to be an absoluate URI pointing to the schema document location.

Note that there is a space character between the namespace declaration and schema document location. That space character is intentional.

------------------------------------------------------------------------
+++

I already verified that this resolves the issue by unjar'ing the standard.jar that is provided by rhel, patching the tlds, rejar'ing, and staring tomcat6.

Comment 2 RHEL Program Management 2016-01-14 16:26:21 UTC
Quality Engineering Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 5 Mikolaj Izdebski 2016-07-22 07:00:42 UTC
Red Hat Enterprise Linux version 6 is entering the Production 2 phase of its lifetime and this bug doesn't meet the criteria for it, i.e. only high severity issues will be fixed. Please see https://access.redhat.com/support/policy/updates/errata/ for further information.

This issue is fixed in Red Hat Enterprise Linux version 7.

Comment 14 errata-xmlrpc 2018-06-19 05:15:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1885