public static Document getDocument(String configFile) throws CoreConfigException { URL resourceUrl = Thread.currentThread().getContextClassLoader().getResource(configFile); if(resourceUrl != null) { LOG.debug("Reading XML file: " + resourceUrl.toString()); return parseDocument(resourceUrl); } else { throw new ConfigurationNotFoundException("Unable to load configuration, could not be found on classpath"); } }