I'm trying to run spring-ws under Java 1.4.
I've added xalan.jar, xercesImpl.jar, serializer.jar and xml-apis.jar to $JAVAHOME/lib/endorsed as the Xalan/Xerces FAQs say, and that fixed the namespace errors.
However I still get this exception while initializing the context:
org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from class path resource [context/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/xml/sax/ext/EntityResolver2
Caused by: java.lang.NoClassDefFoundError: org/xml/sax/ext/EntityResolver2
at org.apache.xerces.parsers.DOMParser.setEntityResol ver(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.setEnti tyResolver(Unknown Source)
at org.springframework.beans.factory.xml.DefaultDocum entLoader.createDocumentBuilder(DefaultDocumentLoa der.java:127)
at org.springframework.beans.factory.xml.DefaultDocum entLoader.loadDocument(DefaultDocumentLoader.java: 75)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:388)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:340)
at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:317)
at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:125)
at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:109)
at org.springframework.context.support.AbstractXmlApp licationContext.loadBeanDefinitions(AbstractXmlApp licationContext.java:79)
at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:94)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:292)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:180)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:156)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:143)
at oh.my.Test.main(Test.java:17)
I'm pretty sure that the problem is not with anything I'm doing in my code or configuration, since the same code works in Java 1.5.
I've tried different Xalan/Xerces versions with no success (I'm currently using Xalan 2.7.0 and Xerces 2.9.0). Google said that someone somewhere said that xalan.jar has to be placed into Tomcat's endorsed directory, but this is client application which doesn't use Tomcat.
Any ideas? Is anyone using spring-ws with Java 1.4?




)
