<p>When I want to validate my XML docuemnts against a schema in my server-side Java, I use the built-in JRE Xerces implementation and javax.xml.validation.Schema.  It works fine, but when validation fails, Xerces gives error messages that are very close to useless, for example:</p>

<pre><code>cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'PopulatedStringType'
</code></pre>

<p>These can take an age to diagnose and track down to the particular part of the XML document that fails validation, and all because of a poor error message.</p>

<p>So my question is, do you use an alternative means of validating XML against Schema, that gives a more useful output on validation failure?  </p>

<p>Please not that this is server-side Java, so please don't say "use XML Spy" or similar.</p>

We use
Oracle's XDK (XML Development Kit)
which includes xmlparserv2.jar with a validating parser and XSLT 2.0.  It uses the JAXB API so you should only have to add it to your classpath and change your imports.  It throws errors that aren't perfect, but I would say more easily understood than your example.