#3568·wiremock

Crash on Android with the 3.13.2

Author: emartynovCreated Aug 25, 2026Updated Aug 25, 2026
Labelsbug

Proposal

We see crash

&{  java.lang.NoSuchMethodError: No static method newDefaultInstance()Ljavax/xml/parsers/DocumentBuilderFactory; in class Ljavax/xml/parsers/DocumentBuilderFactory; or its super classes (declaration of 'javax.xml.parsers.DocumentBuilderFactory' appears in /apex/com.android.art/javalib/core-libart.jar)
	at com.github.tomakehurst.wiremock.common.xml.Xml.newDocumentBuilderFactory(Xml.java:151)
	at com.github.tomakehurst.wiremock.common.xml.Xml.<clinit>(Xml.java:43)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.FormatXmlHelper.<init>(FormatXmlHelper.java:62)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.WireMockHelpers$30.<init>(WireMockHelpers.java:284)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.WireMockHelpers$30.<init>(Unknown Source:0)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.helpers.WireMockHelpers.<clinit>(WireMockHelpers.java:283)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.TemplateEngine.addHelpers(TemplateEngine.java:105)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.TemplateEngine.<init>(TemplateEngine.java:77)
	at com.github.tomakehurst.wiremock.extension.responsetemplating.TemplateEngine.defaultTemplateEngine(TemplateEngine.java:56)
	at com.github.tomakehurst.wiremock.common.filemaker.FilenameMaker.<init>(FilenameMaker.java:44)
	at com.github.tomakehurst.wiremock.common.filemaker.FilenameMaker.<init>(FilenameMaker.java:40)

After short investigation looks like there is no way to stop try to load JDK9 class and Android desugaring doesn't have it.

Reproduction steps

Update Android project with version 3.13.2

References

No response