{"record":{"id":"eea24d7f06999d5b","repo":"hibernate/hibernate-orm","slug":"error-accessing-nested-jar","errorCode":null,"errorMessage":"Error accessing nested jar","messagePattern":"Error accessing nested jar","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarInputStreamBasedArchiveDescriptor.java","lineNumber":115,"sourceCode":"\t\t\t\t\t\tcatch (URISyntaxException e) {\n\t\t\t\t\t\t\tthrow new ArchiveException(\n\t\t\t\t\t\t\t\t\tString.format( Locale.ROOT,\n\t\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\t\tarchiveUrl,\n\t\t\t\t\t\t\t\t\t\t\tjarEntry.getName()\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\te\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\tsubJarInputStream.close();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ArchiveException e) {\n\t\t\t\t\t\tthrow e;\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 nested jar\", e );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfinal String entryName = extractName( jarEntry );\n\t\t\t\t\t\tfinal InputStreamAccess inputStreamAccess = buildByteBasedInputStreamAccess( entryName, jarInputStream );\n\n\t\t\t\t\t\tfinal String relativeName = extractRelativeName( jarEntry );\n\t\t\t\t\t\tentryConsumer.accept( new ArchiveEntryImpl(\n\t\t\t\t\t\t\t\trelativeName,\n\t\t\t\t\t\t\t\trelativeName,\n\t\t\t\t\t\t\t\tnew URI( archiveUrl + \"!/\" + relativeName ),\n\t\t\t\t\t\t\t\tinputStreamAccess\n\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,","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarInputStreamBasedArchiveDescriptor.java#L97-L133","documentation":"Thrown by JarInputStreamBasedArchiveDescriptor when reading entries from a nested jar InputStream fails with a ZipException or IOException.","triggerScenarios":"A jar embedded inside another jar is corrupt or truncated, so iterating its entries fails during scanning.","commonSituations":"Corrupt nested jar from a failed or partial assembly; repackaging tools that damaged inner jars.","solutions":["Rebuild the outer archive so the nested jar is written completely.","Test nested jars with 'unzip -t' after extracting them.","Avoid shading/repackaging steps that corrupt nested jars."],"exampleFix":"A nested jar (jar inside jar) could not be read. Nested archives are not supported for scanning; unpack the nested jar or move the classes to the top-level archive.","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"}