{"record":{"id":"1042843e1b45e43c","repo":"skylot/jadx","slug":"not-found-in-classpath","errorCode":null,"errorMessage":"{} not found in classpath","messagePattern":"(.+?) not found in classpath","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"critical","filePath":"jadx-core/src/main/java/jadx/core/xmlgen/ManifestAttributes.java","lineNumber":89,"sourceCode":"\tprivate final Map<String, MAttr> attrMap = new HashMap<>();\n\tprivate final Map<String, MAttr> appAttrMap = new HashMap<>();\n\n\tpublic ManifestAttributes(IJadxSecurity security) {\n\t\tthis.security = security;\n\t\tparseAll();\n\t}\n\n\tprivate void parseAll() {\n\t\tparse(loadXML(ATTR_XML));\n\t\tparse(loadXML(MANIFEST_ATTR_XML));\n\t\tLOG.debug(\"Loaded android attributes count: {}\", attrMap.size());\n\t}\n\n\tprivate Document loadXML(String xml) {\n\t\tDocument doc;\n\t\ttry (InputStream xmlStream = ManifestAttributes.class.getResourceAsStream(xml)) {\n\t\t\tif (xmlStream == null) {\n\t\t\t\tthrow new JadxRuntimeException(xml + \" not found in classpath\");\n\t\t\t}\n\t\t\tdoc = security.parseXml(xmlStream);\n\t\t} catch (Exception e) {\n\t\t\tthrow new JadxRuntimeException(\"Xml load error, file: \" + xml, e);\n\t\t}\n\t\treturn doc;\n\t}\n\n\tprivate void parse(Document doc) {\n\t\tNodeList nodeList = doc.getChildNodes();\n\t\tfor (int count = 0; count < nodeList.getLength(); count++) {\n\t\t\tNode node = nodeList.item(count);\n\t\t\tif (node.getNodeType() == Node.ELEMENT_NODE\n\t\t\t\t\t&& node.hasChildNodes()) {\n\t\t\t\tparseAttrList(node.getChildNodes());\n\t\t\t}\n\t\t}\n\t}","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/xmlgen/ManifestAttributes.java#L71-L107","documentation":"Thrown by ManifestAttributes.loadXML(String) when ManifestAttributes.class.getResourceAsStream(xml) returns null, meaning the Android attribute definition XML file (attrs.xml or attrs_manifest.xml under /android/) is not on the classpath. These are bundled resource files shipped inside the jadx-core JAR. A null return means the JAR is incomplete, corrupted, or was assembled incorrectly (e.g., a custom shade/fat-jar build that excluded resources).","triggerScenarios":"Loading ManifestAttributes when the jadx-core JAR is missing its bundled /android/attrs.xml or /android/attrs_manifest.xml resources. A custom build or shading step that stripped resource files. A corrupted JAR download. Running from an IDE classpath that excluded resources.","commonSituations":"A custom fat/uber JAR build that only included .class files and dropped resources. Maven/Gradle resource filtering or exclusion misconfiguration. An incomplete jadx installation. IDE resource directory misconfigured to not copy resources to the output.","solutions":["Verify the jadx-core JAR contains the resources: jar tf jadx-core.jar | grep 'android/attrs.xml'.","Rebuild or re-download the jadx JAR from the official release.","If building from source, ensure Maven/Gradle resource copying is enabled (src/main/resources included).","If shading, configure the shade plugin to include resource files, not just classes."],"exampleFix":"// build.gradle — ensure resources are included\n// before (resources excluded)\nsourceSets { main { resources { exclude '**/*.xml' } } }\n\n// after (resources included)\nsourceSets { main { resources { srcDirs = ['src/main/resources'] } } }","handlingStrategy":"validation","validationCode":"public static boolean bundledAttrXmlPresent() {\n    return ManifestAttributes.class.getResourceAsStream(\"/android/attrs.xml\") != null\n        && ManifestAttributes.class.getResourceAsStream(\"/android/attrs_manifest.xml\") != null;\n}","typeGuard":null,"tryCatchPattern":"try {\n    ManifestAttributes ma = new ManifestAttributes(security);\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().contains(\"not found in classpath\")) {\n        System.err.println(\"jadx-core JAR is missing bundled resources. Re-download or rebuild.\");\n    }\n    throw e;\n}","preventionTips":["Verify the jadx-core JAR includes bundled XML resources after building or shading.","Use official releases rather than custom builds unless resource inclusion is verified.","In Maven/Gradle, ensure src/main/resources is on the classpath."],"tags":["classpath","resources","build","packaging","jadx"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}