skylot/jadx · critical · JadxRuntimeException

Xml load error, file: {}

Error message

Xml load error, file: {}

What it means

Thrown by ManifestAttributes.loadXML(String) when the bundled Android attribute XML (attrs.xml or attrs_manifest.xml) was found on the classpath but could not be parsed by security.parseXml(xmlStream). This means the XML is well-formed syntactically enough to open, but the XML parser (behind the IJadxSecurity interface, typically XXE-safe parsing) rejects it due to a parse error. Since these are jadx's own bundled resources, this indicates a corrupted JAR or a tampered/incompatible resource file.

Source

Thrown at jadx-core/src/main/java/jadx/core/xmlgen/ManifestAttributes.java:93

		this.security = security;
		parseAll();
	}

	private void parseAll() {
		parse(loadXML(ATTR_XML));
		parse(loadXML(MANIFEST_ATTR_XML));
		LOG.debug("Loaded android attributes count: {}", attrMap.size());
	}

	private Document loadXML(String xml) {
		Document doc;
		try (InputStream xmlStream = ManifestAttributes.class.getResourceAsStream(xml)) {
			if (xmlStream == null) {
				throw new JadxRuntimeException(xml + " not found in classpath");
			}
			doc = security.parseXml(xmlStream);
		} catch (Exception e) {
			throw new JadxRuntimeException("Xml load error, file: " + xml, e);
		}
		return doc;
	}

	private void parse(Document doc) {
		NodeList nodeList = doc.getChildNodes();
		for (int count = 0; count < nodeList.getLength(); count++) {
			Node node = nodeList.item(count);
			if (node.getNodeType() == Node.ELEMENT_NODE
					&& node.hasChildNodes()) {
				parseAttrList(node.getChildNodes());
			}
		}
	}

	private void parseAttrList(NodeList nodeList) {
		for (int count = 0; count < nodeList.getLength(); count++) {
			Node tempNode = nodeList.item(count);

View on GitHub (pinned to e738a26571)

Solutions

  1. Verify JAR integrity: re-download from the official source and check checksums.
  2. Inspect the XML inside the JAR: unzip -p jadx-core.jar android/attrs.xml | head to check for corruption.
  3. If using a custom IJadxSecurity, test it against known-good XML to rule out parser bugs.
  4. Resolve XML parser version conflicts on the classpath (ensure a modern, compatible Xerces/JDK XML implementation).

Example fix

// before — custom security with overly strict parser that rejects bundled XML
security = new CustomSecurity(); // throws on valid attrs.xml

// after — use standard jadx security or test compatibility
security = new StandardJadxSecurity();
ManifestAttributes ma = new ManifestAttributes(security);
Defensive patterns

Strategy: try-catch

Validate before calling

public static boolean bundledAttrXmlParses(IJadxSecurity security) {
    try (InputStream is = ManifestAttributes.class.getResourceAsStream("/android/attrs.xml")) {
        if (is == null) return false;
        security.parseXml(is);
        return true;
    } catch (Exception e) {
        return false;
    }
}

Try / catch

try {
    ManifestAttributes ma = new ManifestAttributes(security);
} catch (JadxRuntimeException e) {
    if (e.getMessage().contains("Xml load error")) {
        System.err.println("Corrupted bundled XML or incompatible security parser: " + e.getCause());
    }
    throw e;
}

Prevention

When it happens

Trigger: security.parseXml throws a SAXException or ParserConfigurationException because the bundled XML is malformed, truncated, or not valid XML. A corrupted JAR where the XML resource bytes are damaged. A custom security implementation that is stricter than expected and rejects the bundled XML. An XML parsing library version incompatibility.

Common situations: A corrupted JAR download (network error, partial file). A build that processed/transformed the XML resources incorrectly (e.g., a resource filter that mangled the XML). A custom IJadxSecurity implementation with a buggy parser. Classpath conflicts with an older XML parser version.

Related errors


AI-assisted analysis of skylot/jadx@e738a26571 (2026-08-14). Data as JSON: /api/errors/41d41cb1e1144fbc. Report an issue: GitHub.