-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
4.2, 4.3, 5.0, 8.11.0, 8.13.10, 8.13.18, 9.0.0, 8.20.10, 9.3.0, 9.4.0
-
4.02
-
12
-
Severity 3 - Minor
-
2
-
Issue Summary
Can't use StAX from inside a plugins 2 plugin without embedded woodstox in the plugin.
Steps to Reproduce
From a v2 plugin call this:
XMLInputFactory factory = XMLInputFactory.newFactory(); factory.createXMLEventReader(new StringReader("<a></a>"));
Expected Results
The call is successful
Actual Results
You end up with:
javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:154) at javax.xml.stream.FactoryFinder.findJarServiceProvider(FactoryFinder.java:308) at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:233) at javax.xml.stream.XMLInputFactory.newFactory(XMLInputFactory.java:156) at com.atlassian.jira.dev.functest.ao.BlogResource.getAll(BlogResource.java:91) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:206) at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:90)
Notes
- JIRA ships with wstx-asl-3.2.4.jar (Woodstox) in WEB-INF/lib. This JAR registers itself with the JVM to provide implementations of XMLInputFactory, XMLOutputFactory and XMLEventFactory from its META-INF.services. Basically, once we put this JAR in WEB-INF/lib we end up with com.ctc.wstx.stax.WstxInputFactory, com.ctc.wstx.stax.WstxOutputFactory and com.ctc.wstx.stax.WstxEventFactory being the default implementations of these classes.
- The problem is that we don't expose the wstx-asl-3.2.4.jar classes to plugins even though we expose its META-INF.services (we boot delegate META-INF.services)).
- The solution is NOT to simply add the wstx-asl to the packages that we expose to plugins (what happens we change the JAR and replace with a different implementation?).
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available
- is related to
-
CONFSERVER-27669 Force the CCL to be the webapp CL in every StAX factory instantiation
- Closed
-
CWD-2896 Use StAX instead of XMLWriter to generate memberships
- Closed
- relates to
-
JRASERVER-47580 JIRA Analytics events fail with a NullPointerException
- Gathering Impact