{"record":{"id":"6dc1154981b2d5d3","repo":"pinpoint-apm/pinpoint","slug":"not-found-6dc115","errorCode":null,"errorMessage":"!/ not found ","messagePattern":"!/ not found ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/JavaAgentPathResolver.java","lineNumber":101,"sourceCode":"            // get bootstrap.jar location\n            String jarLocation = getJarLocation(this.className);\n            logger.info(\"agentPath:\" + jarLocation);\n            // escape windows leading slash\n            return Paths.get(URI.create(jarLocation));\n        }\n\n        String getJarLocation(String className) {\n            final String internalClassName = className.replace('.', '/') + \".class\";\n            final URL classURL = getResource(internalClassName);\n            if (classURL == null) {\n                return null;\n            }\n\n            if (\"jar\".equals(classURL.getProtocol())) {\n                String path = classURL.getPath();\n                int jarIndex = path.indexOf(\"!/\");\n                if (jarIndex == -1) {\n                    throw new IllegalArgumentException(\"!/ not found \" + path);\n                }\n                final String agentPath = path.substring(0, jarIndex);\n                return agentPath;\n            }\n            // unknown\n            return null;\n        }\n\n        private URL getResource(String internalClassName) {\n            return ClassLoader.getSystemResource(internalClassName);\n        }\n\n    }\n\n    @Deprecated\n    static class InputArgumentAgentPathFinder implements AgentPathFinder {\n\n        private final BootLogger logger = BootLogger.getLogger(getClass());","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/agentdir/JavaAgentPathResolver.java#L83-L119","documentation":"Thrown by JavaAgentPathResolver.getJarLocation when the class location URL uses the 'jar' protocol but its path does not contain the '!/' separator that separates the jar file path from the entry inside it. The resolver cannot extract the agent jar path from such a URL, so it fails fast with IllegalArgumentException.","triggerScenarios":"Locating PinpointAgent.class where the classloader returns a jar-protocol URL with a malformed/nonstandard path (no '!/'), e.g. unusual nested jar URL schemes, custom classloading setups, or running via exotic launchers (Spring Boot nested jars, IDE run wrappers).","commonSituations":"Launching the pinpoint agent inside frameworks that remap jar URLs (Spring Boot fat jar, OSGi, one-jar); IDE-launched agents; shaded or repackaged bootstrap jars.","solutions":["Launch the agent as designed: use -javaagent pointing directly at pinpoint-bootstrap.jar on a plain classloader","Check the logged URL path to see why '!/' is missing; avoid nested-jar launchers for the agent bootstrap","If embedded, ensure the bootstrap jar is on the filesystem as a real file, not inside another jar","Fall back to resolving the agent path via java.class.path or the -javaagent system property instead"],"exampleFix":"// before\njava -cp app.jar org.springframework.boot.loader.JarLauncher // bootstrap class resolved via nested jar URL -> '!/ not found'\n// after\njava -javaagent:/opt/pinpoint-agent/pinpoint-bootstrap.jar -jar app.jar // resolver finds real jar path","handlingStrategy":"fallback","validationCode":"URL loc = PinpointAgent.class.getProtectionDomain().getCodeSource().getLocation();\nif (\"jar\".equals(loc.getProtocol()) && !loc.getPath().contains(\"!/\")) { log.warn(\"malformed jar URL: \" + loc); }","typeGuard":"boolean hasJarSeparator(URL u) { return \"jar\".equals(u.getProtocol()) && u.getPath().contains(\"!/\"); }","tryCatchPattern":"try { String loc = resolver.getJarLocation(); } catch (IllegalArgumentException e) { // fall back to -javaagent system property parsing }","preventionTips":["Launch with plain -javaagent:<path-to-real-jar>, not nested/fat-jar launchers","Keep pinpoint-bootstrap.jar as a standalone file on disk","Log the resolved class URL when debugging agent-path detection"],"tags":["java","classloader","jar-url","agent-bootstrap"],"backgroundTag":"invalid-url-format","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}