quarkusio/quarkus · error · UnsupportedOperationException

Value found for #getJarFileUrls : not supported yet

Error message

Value found for #getJarFileUrls : not supported yet

What it means

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.

Source

Thrown at extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/boot/QuarkusPersistenceUnitDescriptor.java:217

    @Override
    public void pushClassTransformer(final EnhancementContext enhancementContext) {
        // has never been supported
    }

    private static void verifyIgnoredFields(final PersistenceUnitDescriptor toClone) {
        // This one needs to be ignored:
        // if ( toClone.getPersistenceUnitRootUrl() != null ) {
        // throw new UnsupportedOperationException( "Value found for
        // #getPersistenceUnitRootUrl : not supported yet" );
        // }

        // getMappingFiles() is ignored and replaced with an empty list,
        // because we don't need Hibernate ORM to parse the mappings files:
        // they are parsed at compile time and side-loaded during static init.

        if (toClone.getJarFileUrls() != null && !toClone.getJarFileUrls().isEmpty()) {
            throw new UnsupportedOperationException("Value found for #getJarFileUrls : not supported yet");
        }
        if (toClone.getJtaDataSource() != null) {
            throw new UnsupportedOperationException("Value found for #getJtaDataSource : not supported yet");
        }
        if (toClone.getNonJtaDataSource() != null) {
            throw new UnsupportedOperationException("Value found for #getNonJtaDataSource : not supported");
        }
    }

    @Override
    public String toString() {
        return "QuarkusPersistenceUnitDescriptor{" +
                "name='" + name + '\'' +
                ", providerClassName='" + providerClassName + '\'' +
                ", useQuotedIdentifiers=" + useQuotedIdentifiers +
                ", transactionType=" + persistenceUnitTransactionType +
                ", validationMode=" + validationMode +
                ", sharedCacheMode=" + sharedCacheMode +

View on GitHub (pinned to e1c734241f)

Solutions

  1. Remove <jar-file> entries from persistence.xml and place the mapped entities/classes directly in the application so Quarkus indexes them at build time.
  2. Let Quarkus discover entities via @Entity scanning of the application archive instead of jar references.
  3. If entities live in an external JAR, add it as an application dependency so it is indexed during augmentation.

Example fix

<!-- before -->
<persistence-unit name="pu">
  <jar-file>lib/entities.jar</jar-file>
</persistence-unit>
<!-- after -->
<persistence-unit name="pu">
  <class>com.example.MyEntity</class> <!-- or rely on Quarkus scanning -->
</persistence-unit>
Defensive patterns

Strategy: validation

Validate before calling

// Before boot, ensure descriptor has no jar-file URLs
if (desc.getJarFileUrls() != null && !desc.getJarFileUrls().isEmpty()) {
    throw new IllegalStateException("Remove <jar-file> entries; Quarkus scans the app archive instead");
}

Try / catch

try {
    quarkusBoot();
} catch (UnsupportedOperationException e) {
    if (e.getMessage().contains("getJarFileUrls")) {
        log.error("Strip jar-file entries from persistence.xml");
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/c0f403ce216cf455. Report an issue: GitHub.