Nice error message when config XML is invalid
---------------------------------------------
Key: GEOS-1712
URL: http://jira.codehaus.org/browse/GEOS-1712
Project: GeoServer
Issue Type: Bug
Components: Configuration
Affects Versions: 1.7.x
Reporter: David Winslow
Assignee: David Winslow
Priority: Minor
If you have a configuration file that's invalid XML, then you get a really lousy error message like this one:
Embedded error: Error creating bean with name 'validation' defined in URL [jar:file:/home/david/.m2/repository/org/geoserver/validation/1.7.0-SNAPSHOT/validation-1.7.0-SNAPSHOT.jar!/applicationContext.xml]: Can't resolve reference to bean 'config' while setting property 'constructor argument'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'config' defined in URL [jar:file:/home/david/.m2/repository/org/geoserver/main/1.7.0-SNAPSHOT/main-1.7.0-SNAPSHOT.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: Error reading : java.io.InputStreamReader@anonymised.com
XML document structures must start and end within the same entity.
It would be really nice to catch the parse exception and wrap it with one that actually says what went wrong (configuration file is invalid) rather than what class the exception occurred in.
To reproduce: remove the last 10 or so lines from services.xml in a data dir, then start Geoserver.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira