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.
DescriptionCoty 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 2RHEL 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.
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.
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