apache/iceberg · error · IllegalArgumentException

Cannot initialize DellClientFactory, %s does not implement D

Error message

Cannot initialize DellClientFactory, %s does not implement DellClientFactory.

What it means

DellClientFactories.loadClientFactory instantiates the configured class and, when the resulting object cannot be cast to DellClientFactory, throws this IllegalArgumentException from the caught ClassCastException. It means the 'client.factory' property names a class that exists and is instantiable but does not implement the required interface.

Source

Thrown at dell/src/main/java/org/apache/iceberg/dell/DellClientFactories.java:55

    return loadClientFactory(factoryImpl, properties);
  }

  private static DellClientFactory loadClientFactory(String impl, Map<String, String> properties) {
    DynConstructors.Ctor<DellClientFactory> ctor;
    try {
      ctor = DynConstructors.builder(DellClientFactory.class).hiddenImpl(impl).buildChecked();
    } catch (NoSuchMethodException e) {
      throw new IllegalArgumentException(
          String.format(
              "Cannot initialize DellClientFactory, missing no-arg constructor: %s", impl),
          e);
    }

    DellClientFactory factory;
    try {
      factory = ctor.newInstance();
    } catch (ClassCastException e) {
      throw new IllegalArgumentException(
          String.format(
              "Cannot initialize DellClientFactory, %s does not implement DellClientFactory.",
              impl),
          e);
    }

    factory.initialize(properties);
    return factory;
  }

  static class DefaultDellClientFactory implements DellClientFactory {
    private DellProperties dellProperties;

    DefaultDellClientFactory() {}

    @Override
    public S3Client ecsS3() {
      S3Config config = new S3Config(URI.create(dellProperties.ecsS3Endpoint()));

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Point 'client.factory' at a class that implements org.apache.iceberg.dell.DellClientFactory.
  2. Confirm the artifact containing your factory is on the classpath and is the Dell module version matching your Iceberg version.
  3. Remove the property to fall back to the built-in Dell client factory.

Example fix

// before
"client.factory": "com.example.MyHelper"
// after
"client.factory": "com.example.MyHelperEcsClientFactory" // implements DellClientFactory
Defensive patterns

Strategy: validation

Validate before calling

Class<?> cls = Class.forName(factoryClassName);
if (!DellClientFactory.class.isAssignableFrom(cls)) {
  throw new IllegalStateException(factoryClassName + " does not implement DellClientFactory");
}

Try / catch

try {
  DellClientFactories.from(properties);
} catch (IllegalArgumentException e) {
  LOG.error("client.factory must name a DellClientFactory implementation", e);
}

Prevention

When it happens

Trigger: Setting 'client.factory' to a random class (e.g. an ECS client, a helper class, or a factory interface from another catalog) that is not a DellClientFactory implementation.

Common situations: Copy-pasted catalog configs where the factory class belongs to a different catalog implementation (S3/Hadoop) rather than the Dell module; wrong fully-qualified class name; refactoring renamed the interface.

Understand the failure class

Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/8f2790575c480370. Report an issue: GitHub.