https://github.com/itplr-kosit/validator/issues/80 use classloader to initialize jaxb context

This commit is contained in:
Andreas Penski (init) 2021-04-09 09:45:06 +02:00
parent 456c315d23
commit 7726a63a00
2 changed files with 3 additions and 1 deletions

View file

@ -140,7 +140,7 @@ public class ConversionService {
*/
private void initialize(final String contextPath) {
try {
this.jaxbContext = JAXBContext.newInstance(contextPath);
this.jaxbContext = JAXBContext.newInstance(contextPath, ConversionService.class.getClassLoader());
} catch (final JAXBException e) {
throw new IllegalStateException(String.format("Can not create JAXB context for given context: %s", contextPath), e);
}