gradle-executable-jar-plugin icon indicating copy to clipboard operation
gradle-executable-jar-plugin copied to clipboard

SchemaFactory cannot load schemas (*.xsd)

Open stigkj opened this issue 13 years ago • 1 comments

When trying to load schemas (*.xsd) through SchemaFactory, like this:

SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(schemaUrl)

it fails with resource not found, even though the schema can be loaded from the "parent" class.

stigkj avatar Dec 06 '11 12:12 stigkj

Might be this happens because SchemaFactory is using the thread's context classloader for loading schemas

stigkj avatar Dec 06 '11 12:12 stigkj