{"record":{"id":"137e1062f55cd9f6","repo":"hibernate/hibernate-orm","slug":"unable-to-resolve-jar-file-reference-jarfile","errorCode":null,"errorMessage":"Unable to resolve <jar-file/> reference - <jarFileReference>","messagePattern":"Unable to resolve <jar-file/> reference - <jarFileReference>","errorType":"exception","errorClass":"ArchiveException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/archive/internal/ExplodedArchiveDescriptor.java","lineNumber":232,"sourceCode":"\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\ttry {\n\t\t\tvar file = new File( resolveRootDirectory(), jarFileReference );\n\t\t\tif ( file.exists() ) {\n\t\t\t\treturn archiveDescriptorFactory.buildArchiveDescriptor( file.toURI().toURL() );\n\t\t\t}\n\t\t}\n\t\tcatch (MalformedURLException e) {\n\t\t\tthrow new ArchiveException( \"Unable to convert jar File to URL [\" + jarFileReference + \"]\", e );\n\t\t}\n\n\t\tthrow new ArchiveException( \"Unable to resolve <jar-file/> reference - \" + jarFileReference );\n\t}\n}\n","sourceCodeStart":214,"sourceCodeEnd":235,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/archive/internal/ExplodedArchiveDescriptor.java#L214-L235","documentation":"Thrown by ExplodedArchiveDescriptor when a <jar-file/> reference from persistence.xml cannot be resolved to an existing file relative to the exploded archive root.","triggerScenarios":"persistence.xml lists a <jar-file> that does not exist at the expected location relative to the persistence unit root directory.","commonSituations":"A jar was renamed, moved, or not copied into the exploded deployment; the relative path in <jar-file> is wrong (extra '../' or missing subdirectory).","solutions":["Verify the jar file exists at the path referenced by <jar-file> relative to the persistence unit root.","Correct the relative path in the <jar-file> element of persistence.xml.","Rebuild/redeploy the exploded archive so all referenced jars are present."],"exampleFix":"Verify the <jar-file/> reference in persistence.xml: the jar must exist, be readable, and be resolvable relative to the persistence unit root. Fix the path or add the jar to the classpath/deployment.","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"}