{"record":{"id":"d1181bb2db24ede7","repo":"hibernate/hibernate-orm","slug":"error-accessing-jarinputstream-s","errorCode":null,"errorMessage":"Error accessing JarInputStream [%s]","messagePattern":"Error accessing JarInputStream \\[(.+?)\\]","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarInputStreamBasedArchiveDescriptor.java","lineNumber":147,"sourceCode":"\t\t\t\t\t\t) );\n\t\t\t\t\t}\n\t\t\t\t\tcatch (URISyntaxException e) {\n\t\t\t\t\t\tthrow new ArchiveException(\n\t\t\t\t\t\t\t\tString.format( Locale.ROOT,\n\t\t\t\t\t\t\t\t\t\t\"Unable to create archive entry URI: %s - %s\",\n\t\t\t\t\t\t\t\t\t\tarchiveUrl,\n\t\t\t\t\t\t\t\t\t\tjarEntry.getName()\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\te\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tjarInputStream.close();\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tthrow new ArchiveException(\n\t\t\t\t\tString.format( \"Error accessing JarInputStream [%s]\", getArchiveUrl() ),\n\t\t\t\t\tioe\n\t\t\t);\n\t\t}\n\t}\n\n\t@Override\n\tpublic @Nullable ArchiveEntry findEntry(String path) {\n\t\tfinal JarInputStream jarInputStream;\n\t\ttry {\n\t\t\tjarInputStream = new JarInputStream( getArchiveUrl().openStream() );\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t//really should catch IOException but Eclipse is buggy and raise NPE...\n\t\t\tURL_MESSAGE_LOGGER.logUnableToFindFileByUrl( getArchiveUrl(), e );\n\t\t\treturn null;\n\t\t}\n","sourceCodeStart":129,"sourceCodeEnd":165,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarInputStreamBasedArchiveDescriptor.java#L129-L165","documentation":"Thrown by JarInputStreamBasedArchiveDescriptor when closing or reading the JarInputStream for a nested archive fails with an IOException.","triggerScenarios":"The stream backing a nested jar is truncated, closed prematurely, or hits an I/O error while Hibernate finishes scanning it.","commonSituations":"Corrupt outer jar; network filesystem hiccups; another process modifying the archive during startup.","solutions":["Rebuild or redeploy the archive to fix corruption.","Ensure the archive is not modified while the application starts.","Check disk and filesystem health if I/O errors recur."],"exampleFix":"The JarInputStream could not be read, usually because the underlying stream is truncated or corrupted. Rebuild or redeploy the jar and ensure it is fully written before the application starts.","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"}