Bug 1134600

Summary: Tomcat apps fail to deploy with STRICT_SERVLET_COMPLIANCE=true
Product: Red Hat Enterprise Linux 6 Reporter: Aaron Ogburn <aogburn>
Component: tomcat6Assignee: Coty Sutherland <csutherl>
Status: CLOSED CURRENTRELEASE QA Contact: tomcat-qe
Severity: medium Docs Contact: Marc Muehlfeld <mmuehlfe>
Priority: high    
Version: 6.6CC: abhavsar, csutherl, cww, jdoyle, mbabacek, mmadzin, mmuehlfe, pslavice, rwilliam, thozza
Target Milestone: rcKeywords: TestOnly
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Tomcat 6 deploys applications correctly when org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true is set Due to an incorrect XML validation, Tomcat 6 failed to deploy applications when the "org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true" option was set in the `catalina.properties` configuration file. The bug has been fixed, and now Tomcat 6 deploys the applications correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-25 12:03:11 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: 1290856    
Bug Blocks: 1374441, 1461138, 1506690    

Description Aaron Ogburn 2014-08-27 22:01:32 UTC
Description of problem:

Apps now fail to deploy with STRICT_SERVLET_COMPLIANCE=true:

SEVERE: Parse Error at line 18 column 9: Document is invalid: no grammar found.
org.xml.sax.SAXParseException; systemId: file:///usr/share/tomcat6/conf/web.xml; lineNumber: 18; columnNumber: 9; Document is invalid: no grammar found.
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:387)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:321)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:228)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:605)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3102)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:899)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:828)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:757)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:133)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1211)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:551)
        at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)
        at org.apache.catalina.startup.ContextConfig.processDefaultWebConfig(ContextConfig.java:680)
        at org.apache.catalina.startup.ContextConfig.defaultWebConfig(ContextConfig.java:616)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1043)

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Deploy app
2. Add "org.apache.catalina.STRICT_SERVLET_COMPLIANCE=true" to catalina.properties
3. Start tomcat

Actual results:

Apps fail to start with above exception

Expected results:

Apps start successfully


Additional info:

Introduced by changes from CVE-2013-4590.  Use the following in the context.xml as a workaround if you need everything else from STRICT_SERVLET_COMPLIANCE=true:

<Context xmlValidation="false" webXmlNamespaceAware="false" tldValidation="false">

Comment 1 Aaron Ogburn 2014-08-27 22:02:31 UTC
Version-Release number of selected component (if applicable):

6.0.24-78

Comment 6 Michal Karm Babacek 2015-07-07 05:07:08 UTC
@Filip Goldefus: Could you take a look and confirm we have test coverage for this issue? Is it reproducible with Tomcat 7 JWS3? THX

Comment 32 Aniket Bhavsar 2019-03-11 03:56:01 UTC
Is there something that could be communicated to the concerned customer with the justification of the dealy and release date.

It is been pending since long.

Comment 37 Matus Madzin 2020-03-25 08:12:46 UTC
Thanks Coty, QE does not have any objections. The issue was verified by Lukáš Zachar with jakarta-taglibs-standard-1.1.1-11.8.el6 in https://bugzilla.redhat.com/show_bug.cgi?id=1290856#c11