Solution for org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'KeyValuePairList' to a(n) 'type definition' component.

at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.getGlobalDecl(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDElementTraverser.traverseLocal(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.traverseLocalElements(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
Ever run into above exception when trying to schema validate xml documents. Don’t pull your hair out trying to find an issue with the input xml. The solution is pretty simple. Read on for solution.

When trying to perform schema validation on xml documents.  The issue is not in your xml.  It happens to be in the xsd.  Open up your xsd and make sure that all the imports/includes in your xsd are available to the main xsd.  If the xsd’s are local, change the reference/import to be local as well.  More specifically if you are using

<xs:include schemaLocation=""/>
in the xsd header, make sure that the url to the xsd is valid.   If not, make the xsd available locally and change the include to be:
<xs:include schemaLocation="include1.xsd"/>.
That should resolve the issue.