[JIRA] Created: (XSTJ-16) misleading error message on failed schema validation
Ian Young (JIRA)
noreply at shibboleth.net
Wed Aug 31 18:38:25 BST 2011
misleading error message on failed schema validation
----------------------------------------------------
Key: XSTJ-16
URL: https://issues.shibboleth.net/jira/browse/XSTJ-16
Project: XML Security Tool - Java
Issue Type: Bug
Affects Versions: 1.1.5
Reporter: Ian Young
Assignee: Chad La Joie
If schema validation fails, the error message starts out saying "Invalid XML schema files, unable to validate XML" which might lead people to believe that the problem is in the schema files rather than in the input file:
ERROR XmlSecTool - Invalid XML schema files, unable to validate XML
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'md:ArtifactResolutionService'. One of '{"urn:oasis:names:tc:SAML:2.0:metadata":NameIDFormat, "urn:oasis:names:tc:SAML:2.0:metadata":AssertionConsumerService}' is expected.
This seems to be because SAXExceptions from building the validator are handled in the exact same place as SAXExceptions from running the validator (XmlSecTool.java, line 352).
We should probably break this up into two try/catch blocks so that validator build errors (caused by bad schema files) can be distinguished from validation errors.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the commits
mailing list