quarkusio/quarkus · error · RuntimeException

Unable to load 'dropAll' via Liquibase's CommandScope

Error message

Unable to load 'dropAll' via Liquibase's CommandScope

What it means

LiquibaseFunctionalityResource.assertCommandScopeResolvesProperly() instantiates a Liquibase CommandScope("dropAll") and wraps any failure in a RuntimeException('Unable to load 'dropAll' via Liquibase's CommandScope'). CommandScope resolves a Liquibase command by name from the registered CommandFactory; failure means the 'dropAll' command class is not on the classpath or cannot be initialized — typically a Liquibase version/dependency issue where the command was renamed, removed, or its module is missing.

Source

Thrown at integration-tests/liquibase/src/main/java/io/quarkus/it/liquibase/LiquibaseFunctionalityResource.java:89

                try (Statement s = connection.createStatement()) {
                    ResultSet rs = s.executeQuery("SELECT CREATEDBY FROM QUARKUS_TABLE WHERE ID = 1");
                    if (rs.next()) {
                        return rs.getString("CREATEDBY");
                    }
                    return null;
                }
            }
        } catch (Exception ex) {
            throw new WebApplicationException(ex.getMessage(), ex);
        }

    }

    private void assertCommandScopeResolvesProperly() {
        try {
            new CommandScope("dropAll");
        } catch (Exception e) {
            throw new RuntimeException("Unable to load 'dropAll' via Liquibase's CommandScope", e);
        }
    }
}

View on GitHub (pinned to e1c734241f)

Solutions

  1. Check the wrapped cause (RuntimeException carries it) — ClassNotFound/NoSuchMethod errors indicate a Liquibase version mismatch
  2. Align liquibase-core version with the version expected by the Quarkus Liquibase extension (check quarkus platform BOM)
  3. Verify 'dropAll' is a valid command name for your Liquibase version (newer versions may use different command identifiers)
  4. Rebuild with a clean local repository (mvn clean install) to rule out corrupted/mixed Liquibase jars

Example fix

// before
new CommandScope("dropAll");
// after
// pin a compatible Liquibase version in the pom
<dependency>
  <groupId>org.liquibase</groupId>
  <artifactId>liquibase-core</artifactId>
  <version>4.29.2</version> <!-- aligned with quarkus platform -->
</dependency>
Defensive patterns

Strategy: try-catch

Validate before calling

// Verify Liquibase command availability before invoking
try {
    boolean available = new CommandScope("dropAll") != null;
    if (!available) { throw new IllegalStateException("dropAll command unavailable"); }
} catch (Exception e) {
    throw new IllegalStateException("Liquibase CommandFactory cannot resolve 'dropAll': " + e.getMessage(), e);
}

Try / catch

try {
    new CommandScope("dropAll");
} catch (Exception e) {
    // log the root cause (ClassNotFound / NoSuchMethod => version mismatch)
    throw new RuntimeException("Unable to load 'dropAll' via Liquibase's CommandScope", e);
}

Prevention

When it happens

Trigger: Invoking the /liquibase endpoint (doUpdateAuto path) when new CommandScope("dropAll") throws: Liquibase's CommandFactory cannot find or instantiate the dropAll command — e.g. wrong liquibase-core version on the classpath, missing liquibase-command registration, or an exception in the command's constructor/initialization.

Common situations: Liquibase version upgrades where command names/modules changed; the quarkus-liquibase extension pulling an incompatible liquibase-core; shaded/missing dependency in the deployment causing NoSuchMethod/ClassNotFound during command loading.

Related errors


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