{"record":{"id":"c0f403ce216cf455","repo":"quarkusio/quarkus","slug":"value-found-for-getjarfileurls-not-supported-ye","errorCode":null,"errorMessage":"Value found for #getJarFileUrls : not supported yet","messagePattern":"Value found for #getJarFileUrls : not supported yet","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/QuarkusPersistenceUnitDescriptor.java","lineNumber":217,"sourceCode":"\n    @Override\n    public void pushClassTransformer(final EnhancementContext enhancementContext) {\n        // has never been supported\n    }\n\n    private static void verifyIgnoredFields(final PersistenceUnitDescriptor toClone) {\n        // This one needs to be ignored:\n        // if ( toClone.getPersistenceUnitRootUrl() != null ) {\n        // throw new UnsupportedOperationException( \"Value found for\n        // #getPersistenceUnitRootUrl : not supported yet\" );\n        // }\n\n        // getMappingFiles() is ignored and replaced with an empty list,\n        // because we don't need Hibernate ORM to parse the mappings files:\n        // they are parsed at compile time and side-loaded during static init.\n\n        if (toClone.getJarFileUrls() != null && !toClone.getJarFileUrls().isEmpty()) {\n            throw new UnsupportedOperationException(\"Value found for #getJarFileUrls : not supported yet\");\n        }\n        if (toClone.getJtaDataSource() != null) {\n            throw new UnsupportedOperationException(\"Value found for #getJtaDataSource : not supported yet\");\n        }\n        if (toClone.getNonJtaDataSource() != null) {\n            throw new UnsupportedOperationException(\"Value found for #getNonJtaDataSource : not supported\");\n        }\n    }\n\n    @Override\n    public String toString() {\n        return \"QuarkusPersistenceUnitDescriptor{\" +\n                \"name='\" + name + '\\'' +\n                \", providerClassName='\" + providerClassName + '\\'' +\n                \", useQuotedIdentifiers=\" + useQuotedIdentifiers +\n                \", transactionType=\" + persistenceUnitTransactionType +\n                \", validationMode=\" + validationMode +\n                \", sharedCacheMode=\" + sharedCacheMode +","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/QuarkusPersistenceUnitDescriptor.java#L199-L235","documentation":"QuarkusPersistenceUnitDescriptor clones a standard PersistenceUnitDescriptor and validates that fields Quarkus does not support are empty, because mapping/scan discovery is done at augmentation time. If the descriptor carries JAR file URLs (jar-file entries in persistence.xml), verification throws this UnsupportedOperationException since runtime JAR scanning is not implemented.","triggerScenarios":"A persistence.xml (or programmatic descriptor) for the persistence unit declares <jar-file> entries, causing getJarFileUrls() to be non-empty when Quarkus validates and reads the descriptor.","commonSituations":"Migrating a classic Jakarta EE application whose persistence.xml lists jar-files; generating persistence.xml from templates that include jar-file elements; mixing plain Hibernate persistence units with Quarkus-managed ones.","solutions":["Remove <jar-file> entries from persistence.xml and place the mapped entities/classes directly in the application so Quarkus indexes them at build time.","Let Quarkus discover entities via @Entity scanning of the application archive instead of jar references.","If entities live in an external JAR, add it as an application dependency so it is indexed during augmentation."],"exampleFix":"<!-- before -->\n<persistence-unit name=\"pu\">\n  <jar-file>lib/entities.jar</jar-file>\n</persistence-unit>\n<!-- after -->\n<persistence-unit name=\"pu\">\n  <class>com.example.MyEntity</class> <!-- or rely on Quarkus scanning -->\n</persistence-unit>","handlingStrategy":"validation","validationCode":"// Before boot, ensure descriptor has no jar-file URLs\nif (desc.getJarFileUrls() != null && !desc.getJarFileUrls().isEmpty()) {\n    throw new IllegalStateException(\"Remove <jar-file> entries; Quarkus scans the app archive instead\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    quarkusBoot();\n} catch (UnsupportedOperationException e) {\n    if (e.getMessage().contains(\"getJarFileUrls\")) {\n        log.error(\"Strip jar-file entries from persistence.xml\");\n    }\n}","preventionTips":["Never use <jar-file> in persistence.xml under Quarkus","Ship entities as application dependencies so build-time scanning finds them","Rely on @Entity classpath scanning instead of jar references"],"tags":["hibernate-orm","persistence-xml","unsupported","jar-file"],"backgroundTag":"unsupported-persistence-unit-descriptor","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}