{"record":{"id":"97b66029fb38a49e","repo":"hibernate/hibernate-orm","slug":"unable-to-resolve-jar-file-reference","errorCode":null,"errorMessage":"Unable to resolve <jar-file/> reference - {}","messagePattern":"Unable to resolve <jar-file/> reference - (.+?)","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarFileBasedArchiveDescriptor.java","lineNumber":217,"sourceCode":"\t@Override @Nonnull\n\tpublic ArchiveDescriptor resolveJarFileReference(@Nonnull String jarFileReference) {\n\t\t// try it as a relative reference\n\t\tfinal ArchiveEntry entry = findEntry( jarFileReference );\n\t\tif ( entry != null ) {\n\t\t\ttry {\n\t\t\t\treturn new NestedJarDescriptor( entry.getUri().toURL() );\n\t\t\t}\n\t\t\tcatch (MalformedURLException e) {\n\t\t\t\tthrow new ArchiveException( \"Unable to convert relative jar-file reference to URL [\" + jarFileReference + \"]\", e );\n\t\t\t}\n\t\t}\n\n\t\tvar standardResolution = ArchiveHelper.standardJarFileReferenceResolution( jarFileReference, archiveDescriptorFactory );\n\t\tif ( standardResolution != null ) {\n\t\t\treturn standardResolution;\n\t\t}\n\n\t\tthrow new ArchiveException( \"Unable to resolve <jar-file/> reference - \" + jarFileReference );\n\t}\n}\n","sourceCodeStart":199,"sourceCodeEnd":220,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/JarFileBasedArchiveDescriptor.java#L199-L220","documentation":"Thrown by JarFileBasedArchiveDescriptor when the resolved file for a <jar-file/> reference does not exist relative to the containing jar's location.","triggerScenarios":"The relative <jar-file> path in persistence.xml points to a jar that is missing from the deployment.","commonSituations":"Missing jar in the packaged application; incorrect relative path with wrong number of '../' segments.","solutions":["Ensure the referenced jar is packaged at the expected location.","Correct the relative path in the <jar-file> element.","List the deployment contents to confirm where the jar actually resides."],"exampleFix":"The <jar-file/> reference could not be resolved. Check that the referenced jar exists relative to the persistence unit root and that the path in persistence.xml is spelled correctly.","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"}