javax.xml.stream.FactoryFinder$ConfigurationError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • specifying XMLOutputFactory implementation
    via by Amr Ellafy,
  • All V3 nightly tests are failing with this error since yesterday. [wsimport] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation [wsimport] Exception in thread "main" javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found [wsimport] at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:154) [wsimport] at javax.xml.stream.FactoryFinder.findJarServiceProvider(FactoryFinder.java:308) [wsimport] at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:233) [wsimport] at javax.xml.stream.XMLInputFactory.newInstance(XMLInputFactory.java:137) [wsimport] at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.getXMLInputFactory(XMLStreamReaderFactory.java:109) [wsimport] at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.<clinit>(XMLStreamReaderFactory.java:78) [wsimport] at com.sun.tools.ws.wscompile.WsimportOptions.parseBindings(WsimportOptions.java:426) [wsimport] at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:173) [wsimport] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [wsimport] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [wsimport] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [wsimport] at java.lang.reflect.Method.invoke(Method.java:597) [wsimport] at com.sun.tools.ws.Invoker.invoke(Invoker.java:131) [wsimport] at com.sun.tools.ws.WsImport.main(WsImport.java:52) [wsimport] Command invoked: wsimport /export/home/Test4u/space/jdks/jdk1.6.0_13/jre/bin/java -classpath /export/home/Test4u/space/jdks/jdk1.6.0_13/lib/tools.jar:/space/servers/stage/glassfish/modules/gmbal.jar:/space/servers/stage/glassfish/modules/javax.mail.jar:/space/servers/stage/glassfish/modules/javax.security.auth.message.jar:/space/servers/stage/glassfish/modules/jaxb-osgi.jar:/space/servers/stage/glassfish/modules/activation.jar:/space/servers/stage/glassfish/modules/management-api.jar:/space/servers/stage/glassfish/modules/webservices-osgi.jar:/export/home/Test4u/space/test4u/xtests/netbeans-trunk/lib/junit.jar:/export/home/Test4u/space/test4u/xtests/netbeans-trunk/lib/nbjunit.jar com.sun.tools.ws.WsImport -d /export/home/Test4u/space/test4u/cvswork/sunsw/tango/qe-tests/wssecurity/functional/src/build/s1/classes -g -keep /export/home/Test4u/space/test4u/cvswork/sunsw/tango/qe-tests/wssecurity/test/../functional/src/s1/etc/PingServices1.wsdl -b /export/home/Test4u/space/test4u/cvswork/sunsw/tango/qe-tests/wssecurity/functional/src/s1/etc/custom-server.xml
    via by msreekanth,
  • 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. If from a v2 plugin I call this: {code} XMLInputFactory factory = XMLInputFactory.newFactory(); factory.createXMLEventReader(new StringReader("<a></a>")); {code} you will end up with: {noformat} 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) {noformat} 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?).
    via by Brenden Bain [Atlassian],
  • I am working on Jira SDK 6.1.6 to develop a plugin connecting to MicroSoft Web services, in Eclipse with java (1.6) everything goes fine to connect to the MS Web Services. Did debug the web service call to see if the request is able to find the com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory in Eclipse, and yes was able find from "rt.jar" (in JRE/lib folder, Java default implementation). When tried to deploy the same plugin (developed) into Jira instance downloaded from the URL (http://www.atlassian.com/software/jira/download) 64 bit windows instance. (Jira instances 6.1.5, 6.2.3 and 6.2.4 versions, Same error on all the 3 versions). After deploying the plugin get the Initial error: javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.ctc.wstx.stax.WstxInputFactory not found at javax.xml.stream.FactoryFinder.newInstance(Unknown Source) at javax.xml.stream.FactoryFinder.findJarServiceProvider(Unknown Source) at javax.xml.stream.FactoryFinder.find(Unknown Source) at javax.xml.stream.FactoryFinder.find(Unknown Source) at javax.xml.stream.XMLInputFactory.newInstance(Unknown Source) at com.sun.xml.internal.ws.policy.sourcemodel.XmlPolicyModelUnmarshaller.createXMLEventReader(Unknown Source) . . . And after refresh the browser get the error: java.lang.NoClassDefFoundError: Could not initialize class com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.createReader(Unknown Source) at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(Unknown Source) at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source) at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(Unknown Source) at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown Source) at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown Source) . . . Attached are the files with complete stack trace. Extracted the rt.jar from Jira installation path (<installation_folder>\Atlassian\JIRA\jre\lib\rt.jar) Even though the JRE/lib contains the com.sun.xml.internal.ws.api.streaming.XMLStreamReaderFactory class, but not available at run time. Had a look on https://jira.atlassian.com/browse/JRA-26214 https://jira.atlassian.com/browse/CONF-27669 and tried to read the documentation how to use the workaround as in URL (https://bitbucket.org/fakraemer/confluence-smithereens/src/aa131c174b24/src/main/java/com/atlassian/confluence/plugins/smithereens/DefaultXmlFactoryFacade.java?at=refactoring#cl-27) which does not exist! Help would be greatly appreciated for any workaround or fix to deploy the plugin into Jira instance. --Thanks Manjunath
    via by Manjunath Kanakagiri,
  • GitHub comment 4750#20604411
    via GitHub by wildfly-ci
    ,
  • 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. If from a v2 plugin I call this: {code} XMLInputFactory factory = XMLInputFactory.newFactory(); factory.createXMLEventReader(new StringReader("<a></a>")); {code} you will end up with: {noformat} 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) {noformat} 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?).
    via by Brenden Bain [Atlassian],
    • javax.xml.stream.FactoryFinder$ConfigurationError: Provider com.ctc.wstx.stax.WstxOutputFactory not found at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:188)
    No Bugmate found.