
What is the problem?
While installing a new web application stack I ran into an issue apparantly related to an incompatibility between Spring 2.0, JAXP and the Tomcat 4.1.37 LE for JDK1.4 distribution.
Basically I have a web application that uses Spring 2.0. It has been running in production for some time on a Tomcat 4.1.24 and J2SE 1.4.2_15.
I started building a new stack because I wanted to run Tomcat as a 64bit service (see my previous post).
I took the opportunity to upgrade to the latest version of Tomcat (4.1.37) and J2SE 1.4.2_16. I downloaded the so called 'LE for JDK1.4' distribution of Tomcat for Windows (apache-tomcat-4.1.37-LE-jdk14.exe). Seemed like a good deal because it is less bulky and I am running on JDK1.4...
But when I started up my web app I got a beautiful exception:
[gframework .web .servlet .DispatcherServlet] Context initialization failed
org .springframework .beans .factory .BeanDefinitionStoreException: Parser configuration exception parsing XML from ServletContext resource [/WEB-INF/spring-servlet.xml]; nested exception is javax .xml .parsers .ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [org .apache .xerces .jaxp .DocumentBuilderFactoryImpl@22e496ab] does not support XML Schema. Are you running on Java 1.4 or below with Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support.
Very strange indeed, because it complains that the JAXP provider does not support XSD, and suggest to upgrade to Xerces. But the web app already uses Xerces, as is confirmed by the error message ("Your JAXP provider [org .apache .xerces .jaxp .DocumentBuilderFactoryImpl@22e496ab]").
How to fix it?
I did not bother to understand exactly what is causing the error. It looks very much like a classical case of conflicting JARs.
On a hint I re-installed the FULL distribution of Tomcat 4.1.37 (apache-tomcat-4.1.37.exe) instead of the LE for JDK1.4 and guess what? That solved it.
In the hope that this might spare someone else some time,
Humbly yours,
Luca
No comments:
Post a Comment