{
throw new PageNotFoundException("Could not unmarshal the file " + f.getAbsolutePath(), e);
}
catch (ValidationException e)
{
throw new DocumentNotFoundException("Document " + f.getAbsolutePath() + " is not valid", e);
}
catch (SAXException e)
{
throw new PageNotFoundException("Could not unmarshal the file " + f.getAbsolutePath(), e);
}
catch (ParserConfigurationException e)
{
throw new PageNotFoundException("Could not unmarshal the file " + f.getAbsolutePath(), e);
}
if (document == null)
{
throw new DocumentNotFoundException("Document not found: " + path);
}
else
{
if (!clazz.isAssignableFrom(document.getClass()))
{