You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During compilation I faced R8 error that javax.xml.stream.* are missing:
ERROR: R8: Missing class javax.xml.stream.XMLOutputFactory (referenced from: void io.cucumber.junitxmlformatter.XmlReportWriter.writeXmlReport(java.io.Writer))
Missing class javax.xml.stream.XMLStreamWriter (referenced from: javax.xml.stream.XMLStreamWriter io.cucumber.junitxmlformatter.EscapingXmlStreamWriter.writer and 12 other contexts)
[2024-07-15T13:10:52.712+00:00Z] There was 1 failure:
[2024-07-15T13:10:52.712+00:00Z] 1) io.cucumber.android.CucumberJUnitRunnerBuilder
[2024-07-15T13:10:52.712+00:00Z] java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/stream/XMLOutputFactory;
[2024-07-15T13:10:52.712+00:00Z] at io.cucumber.junitxmlformatter.XmlReportWriter.writeXmlReport(XmlReportWriter.java:30)
[2024-07-15T13:10:52.712+00:00Z] at io.cucumber.junitxmlformatter.MessagesToJunitXmlWriter.close(MessagesToJunitXmlWriter.java:60)
[2024-07-15T13:10:52.712+00:00Z] at io.cucumber.core.plugin.JUnitFormatter.write(JUnitFormatter.java:35)
[2024-07-15T13:10:52.712+00:00Z] at io.cucumber.core.plugin.JUnitFormatter.$r8$lambda$lIOZf2g96s60oX1b0tjdfI5LY_s(Unknown Source:0)
...
Looking through SO I found a workaround to add 16 years old library:
[2024-07-15T15:43:39.219+00:00Z] INSTRUMENTATION_STATUS: stack=javax.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.XMLOutputFactoryBase not found
[2024-07-15T15:43:39.219+00:00Z] at javax.xml.stream.FactoryFinder.newInstance(FactoryFinder.java:72)
[2024-07-15T15:43:39.219+00:00Z] at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:176)
[2024-07-15T15:43:39.219+00:00Z] at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:92)
[2024-07-15T15:43:39.219+00:00Z] at javax.xml.stream.XMLOutputFactory.newInstance(XMLOutputFactory.java:98)
[2024-07-15T15:43:39.219+00:00Z] at io.cucumber.junitxmlformatter.XmlReportWriter.writeXmlReport(XmlReportWriter.java:30)
[2024-07-15T15:43:39.219+00:00Z] at io.cucumber.junitxmlformatter.MessagesToJunitXmlWriter.close(MessagesToJunitXmlWriter.java:60)
[2024-07-15T15:43:39.219+00:00Z] at io.cucumber.core.plugin.JUnitFormatter.write(JUnitFormatter.java:35)
...
I don't immediately see how FasterXML/jackson-dataformat-xml#583 would fix the issue. The PR changes .newFactory() to .newInstance() which is already used here. It also looks like there may be something else going on. The error message you got doesn't quite match the one from FasterXML, but rather alipov/ews-android-api#8.
I also don't have anything setup for Android so I can't test or verify anything. But if you can provide a pull request I'd be happy to accept it.
👓 What did you see?
Hi
During compilation I faced R8 error that javax.xml.stream.* are missing:
If I suppress the error with
I see runtime error
Looking through SO I found a workaround to add 16 years old library:
which help a little bit, but still the new error:
I believe this one can be fixed with such approach FasterXML/jackson-dataformat-xml#583
✅ What did you expect to see?
Success compilation and no issues runtime
📦 Which tool/library version are you using?
cucumber-android 7.14.0
Android API 29
JDK 17
🔬 How could we reproduce it?
No response
📚 Any additional context?
No response
The text was updated successfully, but these errors were encountered: