quarkusio/quarkus · error · IllegalArgumentException

No catalogs provided

Error message

No catalogs provided

What it means

Thrown by CatalogMergeUtility.merge when the provided list of extension catalogs is empty. Merging requires at least one catalog; an empty input is a programming/configuration error, reported via IllegalArgumentException.

Source

Thrown at independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/CatalogMergeUtility.java:33

import io.quarkus.registry.catalog.ExtensionCatalog;
import io.quarkus.registry.catalog.ExtensionOrigin;
import io.quarkus.registry.catalog.Platform;
import io.quarkus.registry.catalog.PlatformCatalog;
import io.quarkus.registry.catalog.PlatformRelease;
import io.quarkus.registry.catalog.PlatformStream;
import io.quarkus.registry.json.JsonBuilder;

/**
 * Utility for merging catalog data.
 * Shared only within the package (between ExtensionCatalogResolvers)
 */
public class CatalogMergeUtility {

    // TODO: should be Package private
    public static ExtensionCatalog merge(List<? extends ExtensionCatalog> catalogs) {

        if (catalogs.isEmpty()) {
            throw new IllegalArgumentException("No catalogs provided");
        }
        if (catalogs.size() == 1) {
            return JsonBuilder.buildIfBuilder(catalogs.get(0));
        }

        final List<ExtensionCatalog> roots = detectRoots(catalogs);
        if (roots.size() == 1) {
            return JsonBuilder.buildIfBuilder(roots.get(0));
        }

        final ExtensionCatalog.Mutable combined = ExtensionCatalog.builder();

        final Map<String, Category> categories = new LinkedHashMap<>();
        final Map<String, ExtensionOrigin> derivedFrom = new LinkedHashMap<>();
        final Map<ArtifactKey, Extension.Mutable> extensions = new LinkedHashMap<>();
        final Map<String, Object> metadata = new HashMap<>();

        final Map<String, ExtensionCatalog> originCatalogs = new HashMap<>();

View on GitHub (pinned to e1c734241f)

Solutions

  1. Ensure at least one extension catalog is passed to merge()
  2. Check upstream platform/registry configuration so catalogs are actually resolved before merging
  3. Add a guard validating the list size before calling merge
  4. Log the catalog collection step to find where the list becomes empty

Example fix

// before
CatalogMergeUtility.merge(catalogs); // catalogs is empty
// after
if (catalogs.isEmpty()) {
    throw new IllegalStateException("No platform catalogs were resolved; check registry configuration");
}
CatalogMergeUtility.merge(catalogs);
Defensive patterns

Strategy: validation

Validate before calling

List<ExtensionCatalog> catalogs = collectCatalogs();
if (catalogs == null || catalogs.isEmpty()) {
    throw new IllegalStateException("No extension catalogs collected; check registry/platform configuration before merge");
}

Try / catch

try {
    return CatalogMergeUtility.merge(catalogs);
} catch (IllegalArgumentException e) {
    if ("No catalogs provided".equals(e.getMessage())) {
        // diagnose why upstream collection produced nothing
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling merge(List.of()) or merge with a list that ended up empty because all platform resolutions were skipped/filtered before the call.

Common situations: Configuring a resolver with no registries/platforms so no catalogs are collected; a filtering bug that removes all catalogs upstream; passing an uninitialized list.

Related errors


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