The problem was how I was loading Spring. Using ClassPathXmlApplicationContext
does not work.
You must specify an alternative classloader that can see the libraries in /userlib.
Instead I followed the advice from this answer using a class that was in the same library where my Spring configuration was defined.
final ClassLoader clientClassLoader = SomeSpringBean.class.getClassLoader();
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:SpringContext.xml") {
@Override
protected void initBeanDefinitionReader(XmlBeanDefinitionReader reader) {
super.initBeanDefinitionReader(reader);
reader.setValidationMode(XmlBeanDefinitionReader.VALIDATION_NONE);
reader.setBeanClassLoader(clientClassLoader);
setClassLoader(clientClassLoader);
}
};
Have you added the following Java library to your project's userlib directory?
http://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core