{"record":{"id":"a74e624e562f2543","repo":"alibaba/arthas","slug":"can-not-find-arthas-core-jar-under-arthashome-a","errorCode":null,"errorMessage":"can not find arthas-core.jar under arthasHome: ${arthasHome}","messagePattern":"can not find arthas-core\\.jar under arthasHome: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"critical","filePath":"arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/ArthasAgent.java","lineNumber":110,"sourceCode":"\n            // 检查 arthasHome\n            if (arthasHome == null || arthasHome.trim().isEmpty()) {\n                // 解压出 arthasHome\n                URL coreJarUrl = this.getClass().getClassLoader().getResource(\"arthas-bin.zip\");\n                if (coreJarUrl != null) {\n                    File tempArthasDir = createTempDir();\n                    ZipUtil.unpack(coreJarUrl.openStream(), tempArthasDir);\n                    arthasHome = tempArthasDir.getAbsolutePath();\n                } else {\n                    throw new IllegalArgumentException(\"can not getResources arthas-bin.zip from classloader: \"\n                            + this.getClass().getClassLoader());\n                }\n            }\n\n            // find arthas-core.jar\n            File arthasCoreJarFile = new File(arthasHome, ARTHAS_CORE_JAR);\n            if (!arthasCoreJarFile.exists()) {\n                throw new IllegalStateException(\"can not find arthas-core.jar under arthasHome: \" + arthasHome);\n            }\n            AttachArthasClassloader arthasClassLoader = new AttachArthasClassloader(\n                    new URL[] { arthasCoreJarFile.toURI().toURL() });\n\n            /**\n             * <pre>\n             * ArthasBootstrap bootstrap = ArthasBootstrap.getInstance(inst);\n             * </pre>\n             */\n            Class<?> bootstrapClass = arthasClassLoader.loadClass(ARTHAS_BOOTSTRAP);\n            Object bootstrap = bootstrapClass.getMethod(GET_INSTANCE, Instrumentation.class, Map.class).invoke(null,\n                    instrumentation, configMap);\n            boolean isBind = (Boolean) bootstrapClass.getMethod(IS_BIND).invoke(bootstrap);\n            if (!isBind) {\n                String errorMsg = \"Arthas server port binding failed! Please check $HOME/logs/arthas/arthas.log for more details.\";\n                throw new RuntimeException(errorMsg);\n            }\n        } catch (Throwable e) {","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/alibaba/arthas/blob/21cf2e9ba52b305290be7223b980ff504bb9cb5b/arthas-agent-attach/src/main/java/com/taobao/arthas/agent/attach/ArthasAgent.java#L92-L128","documentation":"Thrown when arthasHome was resolved (explicitly or by extracting arthas-bin.zip) but the expected arthas-core.jar is missing under that directory. ArthasAgent needs arthas-core.jar to load ArthasBootstrap via a dedicated classloader.","triggerScenarios":"arthasHome points at a partial/incomplete arthas installation; an extracted arthas-bin.zip that lacked arthas-core.jar; a typo or wrong path in the arthasHome config.","commonSituations":"Manually copying only some arthas jars; an interrupted unzip; pointing arthasHome at the lib subdir instead of the install root.","solutions":["Verify arthas-core.jar exists under the configured arthasHome (ls $arthasHome/arthas-core.jar).","Reinstall/refresh the arthas distribution so the directory is complete.","Point arthasHome at the correct root directory that contains arthas-core.jar."],"exampleFix":"// before\nconfig.put(\"arthasHome\", \"/opt/arthas/lib\"); // no arthas-core.jar here\n\n// after\nconfig.put(\"arthasHome\", \"/opt/arthas\"); // contains arthas-core.jar","handlingStrategy":"validation","validationCode":"java.io.File core = new java.io.File(arthasHome, \"arthas-core.jar\");\nif (!core.exists()) throw new IllegalStateException(\"arthas-core.jar missing under \" + arthasHome);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify arthasHome contains arthas-core.jar before attach.","Reinstall arthas into a complete directory.","Point arthasHome at the install root, not a subfolder."],"tags":["arthas","agent-attach","filesystem","configuration"],"backgroundTag":null,"analyzedSha":"21cf2e9ba52b305290be7223b980ff504bb9cb5b","analyzedAt":"2026-08-14T00:57:07.243Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}