tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 55166] schemaLocation references between servlet and jsp XSDs are invalid
Date Wed, 03 Jul 2013 03:29:45 GMT

--- Comment #5 from Jeremy Boynes <> ---
Created attachment 30526
full output from test run

I was seeing the problem with xjc running against the resources directory. That
may not be a typical manifestation.

However, I put together this testcase for validation

    public void testValidation() throws Exception {
        System.out.println("ServletContext = " +
        System.out.println("JspFactory = " +
        SchemaFactory schemaFactory =
        schemaFactory.setErrorHandler(new ErrorHandler() {
            public void warning(SAXParseException exception) throws
SAXException {

            public void error(SAXParseException exception) throws SAXException

            public void fatalError(SAXParseException exception) throws
SAXException {
        URL url =
        System.out.println("url = " + url);
        Schema schema = schemaFactory.newSchema(url);

which fails with 

org.xml.sax.SAXParseException; systemId:
lineNumber: 119; columnNumber: 46; schema_reference.4: Failed to read schema
document 'jsp_2_2.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>.

Caused by: JAR entry
javax/servlet/resources/jsp_2_2.xsd not found in

The full output is attached. As you can see, it is looking for jsp_2_2.xsd in
same location as the web-common_3_0.xsd resource that is including it. I ran
against the lib directory from a download of 7.0.41.

I don't know how the TCK is validating. It may have a custom resolver for its
own copies of the XSDs.

You are receiving this mail because:
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message