hibernate/hibernate-orm · error · ArchiveException
Error accessing JarInputStream
Error message
Error accessing JarInputStream [%s]
What it means
Raised when opening or reading the JarInputStream for the archive URL fails with IOException during entry visitation. The archive URL itself could not be streamed - common causes are an unreachable URL, a non-jar resource, or connection failures.
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.
Example fix
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.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: The stream backing a nested jar is truncated, closed prematurely, or hits an I/O error while Hibernate finishes scanning it.
Common situations: Corrupt outer jar; network filesystem hiccups; another process modifying the archive during startup.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/d1181bb2db24ede7.
Report an issue: GitHub.
Appendix: source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarInputStreamBasedArchiveDescriptor.java:147
) );
}
catch (URISyntaxException e) {
throw new ArchiveException(
String.format( Locale.ROOT,
"Unable to create archive entry URI: %s - %s",
archiveUrl,
jarEntry.getName()
),
e
);
}
}
}
jarInputStream.close();
}
catch (IOException ioe) {
throw new ArchiveException(
String.format( "Error accessing JarInputStream [%s]", getArchiveUrl() ),
ioe
);
}
}
@Override
public @Nullable ArchiveEntry findEntry(String path) {
final JarInputStream jarInputStream;
try {
jarInputStream = new JarInputStream( getArchiveUrl().openStream() );
}
catch (Exception e) {
//really should catch IOException but Eclipse is buggy and raise NPE...
URL_MESSAGE_LOGGER.logUnableToFindFileByUrl( getArchiveUrl(), e );
return null;
}
View on GitHub (pinned to fad1729dce)