{"record":{"id":"e27ad93a45a3da42","repo":"hibernate/hibernate-orm","slug":"unable-to-access-stream-from-jar-file-s-for-ent-e27ad9","errorCode":null,"errorMessage":"Unable to access stream from jar file [%s] for entry [%s]","messagePattern":"Unable to access stream from jar file \\[(.+?)\\] for entry \\[(.+?)\\]","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarFileBasedArchiveDescriptor.java","lineNumber":107,"sourceCode":"\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubZipEntry = jarInputStream.getNextEntry();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\tthrow new ArchiveException( \"Error accessing JarFile entry [\" + zipEntry.getName() + \"]\", e );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfinal String name = extractName( zipEntry );\n\t\t\t\t\tfinal String relativeName = extractRelativeName( zipEntry );\n\t\t\t\t\tfinal InputStreamAccess inputStreamAccess;\n\t\t\t\t\ttry (InputStream is = jarFile.getInputStream( zipEntry )) {\n\t\t\t\t\t\tinputStreamAccess = buildByteBasedInputStreamAccess( name, is );\n\t\t\t\t\t}\n\t\t\t\t\tcatch (IOException e) {\n\t\t\t\t\t\tthrow new ArchiveException(\n\t\t\t\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\t\t\t\"Unable to access stream from jar file [%s] for entry [%s]\",\n\t\t\t\t\t\t\t\t\t\tjarFile.getName(),\n\t\t\t\t\t\t\t\t\t\tzipEntry.getName()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tentryConsumer.accept( new ArchiveEntryImpl(\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\trelativeName,\n\t\t\t\t\t\t\tURI.create( \"jar:\" + archiveUrl.toExternalForm() + \"!/\" + relativeName ),\n\t\t\t\t\t\t\tinputStreamAccess\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfinally {","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarFileBasedArchiveDescriptor.java#L89-L125","documentation":"Thrown by JarFileBasedArchiveDescriptor when an InputStream for a specific entry inside the jar cannot be obtained (IOException), even though the jar itself was opened.","triggerScenarios":"A single entry in the jar (class file or resource) cannot be read, typically due to a corrupt zip entry or the jar being closed/modified mid-scan.","commonSituations":"Corrupt jar entries from interrupted builds; jar file overwritten while the application holds it open.","solutions":["Rebuild the jar cleanly (delete build output and rebuild).","Test the jar with 'unzip -t' to find the corrupt entry.","Stop processes that might rewrite the jar during scanning."],"exampleFix":"Ensure the jar file and the named entry both exist and are readable. Close any other handles to the jar, and avoid scanning jars that are being written concurrently.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}