[SWS-409] CommonsXsdSchemaCollection / Apache Schema exceptions do not contain enough detail Created: 05/Aug/08 Updated: 04/May/12 Resolved: 28/Aug/08
|Project:||Spring Web Services|
|Reporter:||Pavel Tcholakov||Assignee:||Arjen Poutsma|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
Spring 2.5.5, Spring WS 1.5.4, Apache XML Schema 1.4.2, Java 1.5, JBoss 4.2.2GA, Windows XP
An <xsd:import/> instruction for an invalid file name causes the following exception on context initialization:
The root cause is a file not found exception, but it's not at all obvious which XSD caused this, nor what file is missing. (In my case there was a typo in a the import instruction so it was quite hard to spot by just examining the schema files.) I think it's mostly org.apache.ws.commons.schema.XmlSchemaException to blame for not correctly displaying the root cause, but it would be even nicer if CommonsXsdSchemaCollection would trap the exception, report explicitly which XSD resource caused it and re-throw it as a CommonsXsdSchemaException.
|Comment by Tareq Abedrabbo [ 25/Aug/08 ]|
It seems that org.apache.ws.commons.schema.XmlSchemaException is not the only exception to be thrown in case of error in the xsd. For instance, org.apache.ws.commons.schema.SchemaBuilder.resolveXmlSchema wraps every exception with a RuntimeException. In some other cases a NPE is thrown.
|Comment by Arjen Poutsma [ 28/Aug/08 ]|
Fixed, thanks for spotting this, and for the patch!\
|Comment by Arjen Poutsma [ 04/May/12 ]|
Closing old issues