NoSuchMethodError after update to Woodstox 5.1.0
See original GitHub issueWoodstox 5.1.0 introduces JAR conflicts due to linkage with newer StAX library. It seems that 5.1.0 cannot be used together with libraries that are dependent on stax2-api 3.1.4 (e.g. Apache Olingo).
This behaviour seems to violate the semantic versioning rules.
java.lang.NoSuchMethodError: org.codehaus.stax2.ri.EmptyIterator.getInstance()Ljava/util/Iterator;
at com.ctc.wstx.util.DataUtil.emptyIterator(DataUtil.java:46)
at com.ctc.wstx.evt.SimpleStartElement.getAttributes(SimpleStartElement.java:111)
at org.odftoolkit.odfdom.pkg.rdfa.RDFaParser.getAttributeByName(RDFaParser.java:414)
at org.odftoolkit.odfdom.pkg.rdfa.RDFaParser.parse(RDFaParser.java:190)
at org.odftoolkit.odfdom.pkg.rdfa.RDFaParser.beginRDFaElement(RDFaParser.java:114)
at org.odftoolkit.odfdom.pkg.rdfa.SAXRDFaParser.startElement(SAXRDFaParser.java:115)
at org.odftoolkit.odfdom.pkg.rdfa.MultiContentHandler.startElement(MultiContentHandler.java:83)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.odftoolkit.odfdom.pkg.OdfFileDom.initialize(OdfFileDom.java:223)
at org.odftoolkit.odfdom.dom.OdfContentDom.initialize(OdfContentDom.java:60)
at org.odftoolkit.odfdom.pkg.OdfFileDom.<init>(OdfFileDom.java:105)
at org.odftoolkit.odfdom.dom.OdfContentDom.<init>(OdfContentDom.java:50)
at org.odftoolkit.odfdom.pkg.OdfFileDom.newFileDom(OdfFileDom.java:157)
at org.odftoolkit.odfdom.pkg.OdfPackageDocument.getFileDom(OdfPackageDocument.java:323)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getFileDom(OdfSchemaDocument.java:405)
at org.odftoolkit.odfdom.dom.OdfSchemaDocument.getContentDom(OdfSchemaDocument.java:206)
at org.odftoolkit.simple.chart.AbstractChartContainer.<init>(AbstractChartContainer.java:71)
at org.odftoolkit.simple.TextDocument$ChartContainerImpl.<init>(TextDocument.java:957)
at org.odftoolkit.simple.TextDocument.getChartContainerImpl(TextDocument.java:948)
at org.odftoolkit.simple.TextDocument.getChartByTitle(TextDocument.java:853)
Reason is the different return type of EmptyIterator.getInstance()
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
13 - Stack Overflow
I had a conflict on the org.codehaus.woodstox:stax2-api which was included in version 3.1.4 within org.apache.cxf:cxf-core and in version ...
Read more >java.lang.nosuchmethoderror: 'org.codehaus.stax2.ri ...
I had a conflict on the org.codehaus.woodstox:stax2-api which was included in ... FasterXML/woodstoxNoSuchMethodError after update to Woodstox 5.1.0#46.
Read more >[HSTTWO-4535] hst-jaxrs uses incorrect woodstox dependency
Platform 208 13.2+Maint+SSO. Description. Hi,. In the dependency: org.onehippo.cms7.hst.components:hst-jaxrs:jar. There is a library mismatch:.
Read more >Incompatible woodstox-core and stax2-api dependencies
2.9.9 upgraded to woodstox-core 5.1 which depends on stax2-api 4.1 but it still depends ... As a result, when using Maven, a dependency...
Read more >Re: Spark 2.x + Tika: java.lang.NoSuchMethodError... - 80304
if you use CDH, could check the spark version on the WebUI, as my side, ... [INFO] | | | +- com.fasterxml.woodstox:woodstox-core:jar:5.1.0:compile [INFO] ......
Read more >
Top Related Medium Post
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I added this and it started working for me.
Exclude older version (
woodstox-core-asl
), and if you have multiplestax2-api
s, older one (but you shouldn’t – artifact name did not change unlike with Woodstox itself).