Affects: spring-webmvc 5.0.13 and above
I'm upgrading spring-webmvc from 4.3.16 to 5.1.17 and getting this error at runtime
06-Aug-2019 15:08:11.901 INFO [localhost-startStop-1] com.sun.xml.ws.transport.http.servlet.WSServletDelegate.<init> WSSERVLET14: JAX-WS servlet initializing
06-Aug-2019 15:08:12.706 WARNING [localhost-startStop-1] org.apache.tomcat.util.digester.Digester.warning Parse Warning Error at line 5 column 17: schema_reference.4: Failed to read schema document 'https://java.sun.com/xml/ns/j2ee/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; systemId: jar:file:/usr/mware/tcServerAppDetails/ROL/webapps/rolol/WEB-INF/lib/spring-webmvc-5.1.7.RELEASE.jar!/META-INF/spring.tld; lineNumber: 5; columnNumber: 17; schema_reference.4:
Failed to read schema document 'https://java.sun.com/xml/ns/j2ee/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:203) 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:2451) at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1768) at
com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741) at
which was caused by this change in WEB-INF/spring.tld and WEB-INF/spring-form.tld from
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">
to (basically a change of schema location from http protocol to https protocol)
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee https://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">
although the xsd file is available and accessible over the network, it didn't work for us because our application stays within an intranet and not having access to external network. Also it seems that there isn't any schema mapping for taglib with https that's why only https did not work for our application. Do you have any advice on this? If there's any fix that need to be made, I would be happy to contribute
Comment From: tunneln
Any update or fix found for this issue?
Comment From: sbrannen
According to @markt-asf, this issue has already been fixed in Tomcat in all currently supported Tomcat versions (7.0.x to 10.0.x) released after April 2019. See https://bz.apache.org/bugzilla/show_bug.cgi?id=63311.
In light of that, I am closing this issue.