hibernate/hibernate-orm · error · ArchiveException
Error accessing JarFile entry [{}]
Error message
Error accessing JarFile entry [{}] What it means
Thrown by JarFileBasedArchiveDescriptor when reading an entry from a JarFile fails with an IOException during archive scanning.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarFileBasedArchiveDescriptor.java:96
while ( subZipEntry != null ) {
if ( ! subZipEntry.isDirectory() ) {
final String name = extractName( subZipEntry );
final String relativeName = extractRelativeName( subZipEntry );
entryConsumer.accept( new ArchiveEntryImpl(
name,
relativeName,
URI.create( "jar:" + archiveUrl.toExternalForm() + "!/" + relativeName ),
buildByteBasedInputStreamAccess( name, jarInputStream )
) );
}
subZipEntry = jarInputStream.getNextEntry();
}
}
catch (Exception e) {
throw new ArchiveException( "Error accessing JarFile entry [" + zipEntry.getName() + "]", e );
}
}
else {
final String name = extractName( zipEntry );
final String relativeName = extractRelativeName( zipEntry );
final InputStreamAccess inputStreamAccess;
try (InputStream is = jarFile.getInputStream( zipEntry )) {
inputStreamAccess = buildByteBasedInputStreamAccess( name, is );
}
catch (IOException e) {
throw new ArchiveException(
String.format(
"Unable to access stream from jar file [%s] for entry [%s]",
jarFile.getName(),
zipEntry.getName()
)
);
}View on GitHub (pinned to fad1729dce)
Solutions
- Rebuild or re-download the jar file to fix corruption.
- Verify jar integrity with 'jar tf file.jar' or 'unzip -t file.jar'.
- Avoid replacing jar files in a running deployment; redeploy instead.
Example fix
The jar entry could not be read. Verify the jar file is not corrupted (run 'jar tf' on it), that it is fully written before Hibernate scans it, and that the process has read access to it.
When it happens
Trigger: The jar referenced by a <jar-file> entry or the persistence unit root is corrupt, truncated, or becomes unreadable while Hibernate iterates its entries.
Common situations: Corrupted jar from a partial download or failed build; jar modified/replaced while the application is running; disk I/O errors.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/d73159caa5efa733.
Report an issue: GitHub.