hibernate/hibernate-orm · error · ArchiveException
Unable to create archive entry URI: %s - %s
Error message
Unable to create archive entry URI: %s - %s
What it means
Thrown by JarInputStreamBasedArchiveDescriptor when a URI for an archive entry cannot be created while scanning a jar provided as an InputStream (URISyntaxException).
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarInputStreamBasedArchiveDescriptor.java:98
// This algorithm assumes that the zipped file is only the URL root (including entry), not
// just any random entry
try {
final JarInputStream subJarInputStream = new JarInputStream( jarInputStream );
try {
ZipEntry subZipEntry = jarInputStream.getNextEntry();
while (subZipEntry != null) {
if ( ! subZipEntry.isDirectory() ) {
final String subName = extractName( subZipEntry );
final InputStreamAccess inputStreamAccess = buildByteBasedInputStreamAccess( subName, subJarInputStream );
entryConsumer.accept( new ArchiveEntryImpl( subName, subName, new URI(archiveUrl + "!/" + subName), inputStreamAccess ) );
}
subZipEntry = jarInputStream.getNextJarEntry();
}
}
catch (URISyntaxException e) {
throw new ArchiveException(
String.format( Locale.ROOT,
"Unable to create archive entry URI: %s - %s",
archiveUrl,
jarEntry.getName()
),
e
);
}
finally {
subJarInputStream.close();
}
}
catch (ArchiveException e) {
throw e;
}
catch (Exception e) {
throw new ArchiveException( "Error accessing nested jar", e );
}View on GitHub (pinned to fad1729dce)
Solutions
- Remove spaces and special characters from entry and jar names inside nested archives.
- Avoid nested-jar scanning by extracting the nested jar and referencing it directly.
Example fix
The entry inside the jar input stream could not be turned into a URI. Make sure entry names in the jar are valid (no spaces or illegal URI characters) and that the base archive URL is well-formed.
When it happens
Trigger: Scanning a nested jar from an InputStream where an entry name or the base URI produces an invalid URI string.
Common situations: Nested jars (jar inside jar) whose entry names contain spaces or characters invalid in URIs.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/6bb508858003af24.
Report an issue: GitHub.