tags:

views:

36

answers:

1

I have a Spring application (not a web app) that should be possible to run offline. However, when I try to do that, it crashes with this error message:

- Loading XML bean definitions from class path resource [applicationContext.xml]
21220 [main] WARN  org.springframework.beans.factory.xml.XmlBeanDefinitionReader 
 - Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/tool/spring-tool-3.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(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(Unknown Source)
...

This is caused by Spring not being able to find the schemas, as they are online and Spring is offline. How can I run my Spring apps offline?

+2  A: 

Duplicate. See:

etc.

kaliatech
I've seen those already, but I can not get the solution to work.
mranders
Are you able to determine what XML file is referencing "spring-tool-3.0.xsd"? (A global search-replace in files might be needed because it could be 3rd party jar). If so, can you change it? See: http://stackoverflow.com/questions/3304088/websphere-tries-to-load-spring-related-schemas-from-internet
kaliatech
This ended up being a maven-assembly-plugin bug. Description of bug and workaround here: http://jira.codehaus.org/browse/MASSEMBLY-360
mranders