{"record":{"id":"c35c35b076a3eb16","repo":"pinpoint-apm/pinpoint","slug":"banner-io-failed","errorCode":null,"errorMessage":"banner IO failed","messagePattern":"banner IO failed","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"warning","filePath":"banner/src/main/java/com/navercorp/pinpoint/banner/BannerSupplier.java","lineNumber":34,"sourceCode":"\n    public BannerSupplier(String file) {\n        this.file = Objects.requireNonNull(file, \"file\");\n    }\n\n    public String get() {\n        return banner(file);\n    }\n\n    private String banner(String bannerFile) {\n        List<String> lines = readLines(bannerFile);\n        return writeBanner(lines);\n    }\n\n    private List<String> readLines(String bannerFile) {\n        try (InputStream inputStream = getClass().getResourceAsStream(bannerFile)) {\n            return BannerIOUtils.readLines(inputStream, StandardCharsets.UTF_8);\n        } catch (IOException e) {\n            throw new RuntimeException(\"banner IO failed\", e);\n        }\n    }\n\n    private String writeBanner(List<String> lines) {\n        String lineSeparator = System.lineSeparator();\n\n        StringBuilder buffer = new StringBuilder(64);\n        for (String line : lines) {\n            buffer.append(line);\n            buffer.append(lineSeparator);\n        }\n        return buffer.toString();\n    }\n}\n","sourceCodeStart":16,"sourceCodeEnd":49,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/banner/src/main/java/com/navercorp/pinpoint/banner/BannerSupplier.java#L16-L49","documentation":"BannerSupplier.readLines loads a banner resource from the classpath and, on IOException, wraps it in a RuntimeException with the message 'banner IO failed'. This turns a non-fatal cosmetic failure (printing the startup banner) into an exception that propagates to the caller.","triggerScenarios":"getClass().getResourceAsStream(bannerFile) returns a stream that fails to read, or BannerIOUtils.readLines throws IOException while reading the banner resource (resource present but unreadable/corrupt stream).","commonSituations":"Banner resource missing from a repackaged jar (leading to NPE stream in some paths) or I/O issues in exotic classloader environments; typically seen during application startup.","solutions":["Verify the banner resource exists on the classpath at the expected path","Rebuild/repackage the artifact so the banner file is included","Catch or tolerate the RuntimeException at the banner-print call site since it is cosmetic"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"InputStream in = getClass().getResourceAsStream(bannerFile);\nif (in == null) { return Collections.emptyList(); }","typeGuard":null,"tryCatchPattern":"try { banner.print(); } catch (RuntimeException e) { log.debug(\"banner skipped: {}\", e.getMessage()); }","preventionTips":["Verify banner resources are included in the packaged jar","Keep banner printing non-fatal — catch and log at the call site","Add the resource to build config (maven/gradle resources) explicitly"],"tags":["java","io","classpath"],"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"}