}
XmlOptions xmlOptions = new XmlOptions();
xmlOptions.setLoadLineNumbers();
Collection errors = new ArrayList();
xmlOptions.setErrorListener(errors);
if (!configurationDoc.validate(xmlOptions)) {
throw new DeploymentException("Invalid deployment descriptor: " + errors + "\nDescriptor: " + configurationDoc.toString());
}
return configurationDoc.getConfiguration();
} catch (XmlException e) {
throw new DeploymentException("Could not parse xml in plan", e);