Class Loading

XML Parsing Library in a JIRA Plugin does not work

When developing a JIRA Plugin and trying to parse XML data from external sources and displaying it, the parsing with the commonly used Woodstox library failed with the following error: javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found Debugging took a considerable amount of time as the library was actually added into maven but was not available once installing the plugin in JIRA. The problem relied in OSGi class loading and a problem with the xml parsing library architecture which has its root in an IBM architecture decision. Unfortunately I cannot find the link anymore which explained it in more detail. The only solution was to switch from STAX parsing to DOM parsing if XML parsing is inevitable. Even alternative XML parsers will not work who work with STAX.
Subscribe to Class Loading