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

@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- [CLI] [#74](https://projekte.kosit.org/kosit/validator/-/issues/74) fix ansi output of the cli version
- [#80](https://github.com/itplr-kosit/validator/issues/80) using classloader to initialize jaxb context (to support usage in OSGi
environments)
## 1.4.1

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);
}