sbgn / libsbgn

Libraries for the Systems Biology Graphical Notation (SBGN); Java and C++
Other
15 stars 8 forks source link

Added exception handling when getting JAXB context #48

Closed tczauderna closed 5 years ago

tczauderna commented 5 years ago

In particular circumstances it can happen that JAXBContext.newInstance("org.sbgn.bindings") fails.

This code might work all the time ClassLoader classLoader = org.sbgn.bindings.ObjectFactory.class.getClassLoader(); JAXBContext.newInstance("org.sbgn.bindings", classLoader);

Added a util class with a method getJAXBContext.