{"record":{"id":"9fa9aef7dfb8210d","repo":"pinpoint-apm/pinpoint","slug":"s-load-fail-caused-by-s-9fa9ae","errorCode":null,"errorMessage":"%s load fail Caused by:%s","messagePattern":"(.+?) load fail Caused by:(.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/PropertyLoaderUtils.java","lineNumber":21,"sourceCode":"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.nio.charset.StandardCharsets;\nimport java.nio.file.Files;\nimport java.nio.file.Path;\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.util.Properties;\n\npublic class PropertyLoaderUtils {\n\n    public static final String[] ALLOWED_PROPERTY_PREFIX = new String[]{\"bytecode.\", \"profiler.\", \"pinpoint.\"};\n\n    public static Properties loadFileProperties(Path filePath) {\n        Properties properties = new Properties();\n        try (BufferedReader reader = Files.newBufferedReader(filePath, StandardCharsets.UTF_8)) {\n            properties.load(reader);\n        } catch (IOException e) {\n            throw new IllegalStateException(String.format(\"%s load fail Caused by:%s\", filePath, e.getMessage()), e);\n        }\n        return properties;\n    }\n\n\n    public static <K, V> Map<K, V> filterAllowedPrefix(Map<K, V> properties) {\n        final Map<K, V> copy = new HashMap<>();\n        for (Map.Entry<K, V> entry : properties.entrySet()) {\n            final K key = entry.getKey();\n            final V value = entry.getValue();\n            if (key instanceof String && value instanceof String) {\n                final String name = (String) key;\n                if (filter(name)) {\n                    copy.put(key, value);\n                }\n            }\n        }\n        return copy;","sourceCodeStart":3,"sourceCodeEnd":39,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/agent-module/bootstraps/bootstrap/src/main/java/com/navercorp/pinpoint/bootstrap/config/PropertyLoaderUtils.java#L3-L39","documentation":"Thrown by PropertyLoaderUtils.loadFileProperties when reading a properties file as UTF-8 raises IOException. The method wraps the failure into an IllegalStateException including the file path and the cause message, since config loading happens at agent startup and cannot continue without the properties.","triggerScenarios":"Calling loadFileProperties(Path) on a file that does not exist, is a directory, or is unreadable — or on a file with invalid UTF-8 bytes / malformed escapes that make properties parsing fail.","commonSituations":"Wrong config file path in the agent setup; plugin or profile config renamed/missing after upgrade; non-UTF8 encoded config (GBK/latin-1) saved by an editor; permission changes after deployment.","solutions":["Verify the path exists and is readable: ls -l <file>; fix the path or permissions","Check the cause message in the exception (missing file vs read error vs decode failure)","Re-save the config file as UTF-8 without a BOM","Redeploy the missing config file from the agent distribution"],"exampleFix":"// before\nProperties p = PropertyLoaderUtils.loadFileProperties(Paths.get(\"/agent/pinpoint.config\")); // file missing\n// after\nPath cfg = Paths.get(\"/agent/pinpoint.config\");\nif (!Files.isRegularFile(cfg)) { throw new IllegalStateException(\"config missing: \" + cfg); }\nProperties p = PropertyLoaderUtils.loadFileProperties(cfg);","handlingStrategy":"validation","validationCode":"Path cfg = Paths.get(path);\nif (!Files.isRegularFile(cfg)) throw new IllegalStateException(\"config missing: \" + cfg);\nif (!Files.isReadable(cfg)) throw new IllegalStateException(\"config unreadable: \" + cfg);","typeGuard":"boolean isReadableFile(Path p) { return Files.isRegularFile(p) && Files.isReadable(p); }","tryCatchPattern":"try { props = PropertyLoaderUtils.loadFileProperties(path); } catch (IllegalStateException e) { log.error(\"properties load failed: {}\", e.getMessage(), e.getCause()); throw e; }","preventionTips":["Resolve config paths relative to the agent home, verified at startup","Save properties files as UTF-8 without BOM","Check file existence/permissions in deployment scripts before launching"],"tags":["java","properties","io","configuration"],"backgroundTag":"file-read-failed","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"}