{"record":{"id":"771597971641a4f6","repo":"skylot/jadx","slug":"error-loading-jadx-class-set","errorCode":null,"errorMessage":"Error loading jadx class set","messagePattern":"Error loading jadx class set","errorType":"exception","errorClass":"JadxRuntimeException","httpStatus":null,"severity":"critical","filePath":"jadx-core/src/main/java/jadx/core/dex/nodes/RootNode.java","lineNumber":276,"sourceCode":"\tpublic void processResources(ResourceStorage resStorage) {\n\t\tconstValues.setResourcesNames(resStorage.getResourcesNames());\n\t\tappPackage = resStorage.getAppPackage();\n\t\tappResClass = AndroidResourcesUtils.searchAppResClass(this, resStorage);\n\t}\n\n\tpublic void initClassPath() {\n\t\ttry {\n\t\t\tif (this.clsp == null) {\n\t\t\t\tClspGraph newClsp = new ClspGraph(this);\n\t\t\t\tif (args.isLoadJadxClsSetFile()) {\n\t\t\t\t\tnewClsp.loadClsSetFile();\n\t\t\t\t}\n\t\t\t\tnewClsp.addApp(classes);\n\t\t\t\tnewClsp.initCache();\n\t\t\t\tthis.clsp = newClsp;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new JadxRuntimeException(\"Error loading jadx class set\", e);\n\t\t}\n\t}\n\n\tprivate void updateObfuscatedFiles(IResTableParser parser, List<ResourceFile> resources) {\n\t\tif (args.isSkipResources()) {\n\t\t\treturn;\n\t\t}\n\t\tboolean useHeaders = args.isUseHeadersForDetectResourceExtensions();\n\t\tlong start = System.currentTimeMillis();\n\t\tint renamedCount = 0;\n\t\tResourceStorage resStorage = parser.getResStorage();\n\t\tValuesParser valuesParser = new ValuesParser(parser.getStrings(), resStorage.getResourcesNames());\n\t\tMap<String, ResourceEntry> entryNames = new HashMap<>();\n\t\tfor (ResourceEntry resEntry : resStorage.getResources()) {\n\t\t\tString val = valuesParser.getSimpleValueString(resEntry);\n\t\t\tif (val != null) {\n\t\t\t\tentryNames.put(val, resEntry);\n\t\t\t}","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/skylot/jadx/blob/e738a26571d02919f01df40de93bc9a44dee4e18/jadx-core/src/main/java/jadx/core/dex/nodes/RootNode.java#L258-L294","documentation":"RootNode.initClassPath() builds the ClspGraph (class hierarchy / classpath graph). The try/catch wraps loading the jadx class-set file (core.deobf / .json), adding application classes, and initializing the cache. ANY failure aborts classpath setup with a chained cause. This is process-fatal: without ClspGraph, type resolution cannot proceed.","triggerScenarios":"The bundled/cached jadx class-set file is missing, corrupt, or incompatible; addApp(classes) hits a corrupt app class; or initCache fails on bad type data.","commonSituations":"First run with a missing or partially downloaded class-set file, a corrupt jadx install, a version mismatch between the class-set file and the JADX build, or a corrupted APK that breaks class hierarchy ingestion.","solutions":["Delete the JADX cache/class-set directory and let it regenerate, or reinstall JADX cleanly.","Upgrade to a matching JADX release where the class-set file version aligns with the binary.","Ensure the APK file is not corrupt (re-download / re-extract).","Check the chained cause in the stack trace — it identifies whether loadClsSetFile, addApp, or initCache failed."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Before loading, confirm the jadx class-set file exists and is non-empty,\n// or that auto-download is enabled.\nPath clspDir = Path.of(System.getProperty(\"user.home\"), \".cache\", \"jadx\");\nif (args.isLoadJadxClsSetFile()) {\n    Path f = clspDir.resolve(\"core.deobf\");\n    if (!Files.exists(f) || Files.size(f) == 0) {\n        throw new IllegalStateException(\"jadx class-set file missing or empty: \" + f);\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    jadx.load();\n} catch (JadxRuntimeException e) {\n    if (e.getMessage().equals(\"Error loading jadx class set\")) {\n        // Clear the cache and retry once with a fresh class-set download.\n        cleanJadxCache();\n        jadx = new JadxDecompiler(args);\n        jadx.load();\n    } else throw e;\n}","preventionTips":["Ensure the jadx class-set file matches the JADX build version.","Clear the JADX cache directory on version upgrades to avoid stale class-set files.","Verify the APK is not corrupt before loading."],"tags":["classpath","clsp-graph","fatal","install-issue"],"backgroundTag":null,"analyzedSha":"e738a26571d02919f01df40de93bc9a44dee4e18","analyzedAt":"2026-08-14T00:10:24.238Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}