{"record":{"id":"0754140c56456dd7","repo":"quarkusio/quarkus","slug":"unable-to-read-entry-configfilename-from-jar","errorCode":null,"errorMessage":"Unable to read entry: ${configFileName} from jar: ${jarFile}","messagePattern":"Unable to read entry: (.+?) from jar: (.+?)","errorType":"exception","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/AotSerializedApplication.java","lineNumber":283,"sourceCode":"\n        public Map<String, List<ApplicationConfigEntry>> getApplicationConfigFiles() {\n            return applicationConfigFiles;\n        }\n\n        @Override\n        public void visitJarFileEntry(JarFile jarFile, ZipEntry fileEntry) {\n            if (!AotRunnerClassLoader.isApplicationConfigFile(fileEntry.getName())) {\n                return;\n            }\n\n            String configFileName = fileEntry.getName();\n\n            try (var is = jarFile.getInputStream(fileEntry)) {\n                String jarName = Paths.get(jarFile.getName()).getFileName().toString();\n                applicationConfigFiles.computeIfAbsent(configFileName, k -> new ArrayList<>())\n                        .add(new ApplicationConfigEntry(jarName + \"!/\" + configFileName, is.readAllBytes()));\n            } catch (IOException e) {\n                throw new UncheckedIOException(\"Unable to read entry: \" + configFileName + \" from jar: \" + jarFile, e);\n            }\n        }\n\n        @Override\n        public void visitRegularFile(Path jar, Path file, String relativePath) {\n            if (!AotRunnerClassLoader.isApplicationConfigFile(relativePath)) {\n                return;\n            }\n\n            try {\n                String jarName = jar.getFileName().toString();\n                applicationConfigFiles.computeIfAbsent(relativePath, k -> new ArrayList<>())\n                        .add(new ApplicationConfigEntry(jarName + \"!/\" + relativePath, Files.readAllBytes(file)));\n            } catch (IOException e) {\n                throw new UncheckedIOException(\"Unable to read file: \" + relativePath, e);\n            }\n        }\n    }","sourceCodeStart":265,"sourceCodeEnd":301,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/runner/src/main/java/io/quarkus/bootstrap/runner/AotSerializedApplication.java#L265-L301","documentation":"Thrown as an UncheckedIOException when the AOT serializer cannot open or read an application config file entry (application.properties / application.yaml style resources) inside a jar during serialization. Signals a corrupt jar, an entry that vanished, or a closed/invalid zip file.","triggerScenarios":"visitJarFileEntry calls jarFile.getInputStream(fileEntry) or is.readAllBytes() for an isApplicationConfigFile entry and an IOException occurs — typically a truncated or corrupted jar in the lib directory.","commonSituations":"Interrupted/incomplete download or copy of an application jar; disk-full during packaging; jar rebuilt (entries invalidated) while the app is serializing; running from a partially-updated lib/ directory.","solutions":["Rebuild or re-download the offending jar (mvn clean package) — corruption is the usual cause.","Verify jar integrity: jar tf <jarFile> or unzip -t; replace any jar that fails.","Ensure no process rebuilds/copies the lib directory while the application is starting or being serialized.","Check free disk space and complete file transfers before launching."],"exampleFix":"// before\nmvn package\n// after\nmvn clean package && unzip -t target/quarkus-app/lib/*.jar  # verify each jar opens","handlingStrategy":"validation","validationCode":"for (Path jar : libs) {\n  if (!Files.isReadable(jar)) throw new IllegalStateException(\"unreadable jar: \" + jar);\n  try (var zf = new java.util.zip.ZipFile(jar.toFile())) { if (zf.getEntry(configFileName) == null) log.warn(\"missing entry \" + configFileName); }\n}","typeGuard":"boolean isValidJar(Path p) { try (var zf = new java.util.zip.ZipFile(p.toFile())) { return zf.size() >= 0; } catch (Exception e) { return false; } }","tryCatchPattern":"try { app.start(); } catch (UncheckedIOException e) { if (e.getMessage().contains(\"Unable to read entry\")) { log.error(\"Corrupt jar detected: {}\", e.getMessage(), e); throw new IllegalStateException(\"Redeploy application — corrupt jar\", e); } throw e; }","preventionTips":["Verify jars with unzip -t / jar tf after transfer.","Use atomic copy (temp + rename) when deploying.","Check disk space before packaging.","Never rebuild jars while the application is starting."],"tags":["io","jar","corruption"],"backgroundTag":"corrupt-jar-file","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}