apache/iceberg · error · IllegalArgumentException
Cannot initialize DellClientFactory, missing no-arg construc
Error message
Cannot initialize DellClientFactory, missing no-arg constructor: %s
What it means
DellClientFactories.loadClientFactory builds the implementation class named by the client.factory property via reflection. If the class has no public no-arg constructor, DynConstructors fails with NoSuchMethodException and this IllegalArgumentException is thrown. Dell client factories must be instantiable without arguments.
Source
Thrown at dell/src/main/java/org/apache/iceberg/dell/DellClientFactories.java:45
import org.apache.iceberg.util.PropertyUtil;
public class DellClientFactories {
private DellClientFactories() {}
public static DellClientFactory from(Map<String, String> properties) {
String factoryImpl =
PropertyUtil.propertyAsString(
properties, DellProperties.CLIENT_FACTORY, DefaultDellClientFactory.class.getName());
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;View on GitHub (pinned to 86d9c8fc54)
Solutions
- Add a public no-arg constructor to the configured DellClientFactory implementation and read configuration from the properties passed later.
- Verify the 'client.factory' property points at the intended class (check for typos or a stale class name).
- Use DellClientFactories.from(properties) with the built-in default factory if a custom one is unnecessary.
Example fix
// before
class MyEcsFactory implements DellClientFactory {
MyEcsFactory(String endpoint) { ... }
}
// after
class MyEcsFactory implements DellClientFactory {
public MyEcsFactory() { }
@Override
public void initialize(Map<String, String> properties) { ... }
} Defensive patterns
Strategy: validation
Validate before calling
Class<?> cls = Class.forName(factoryClassName);
if (java.util.Arrays.stream(cls.getConstructors()).noneMatch(c -> c.getParameterCount() == 0)) {
throw new IllegalStateException(factoryClassName + " needs a public no-arg constructor");
} Try / catch
try {
DellClientFactories.from(properties);
} catch (IllegalArgumentException e) {
LOG.error("Check client.factory property: {}", e.getMessage(), e);
} Prevention
- Always give custom DellClientFactory impls a public no-arg constructor
- Pass configuration via initialize(properties), not constructor args
- Double-check the fully-qualified class name in 'client.factory'
When it happens
Trigger: Setting the catalog property 'client.factory' (ClientConfigProperties.CLIENT_FACTORY) to a class that only defines parameterized constructors, e.g. a DellClientFactory subclass requiring config in its constructor.
Common situations: Custom Dell client factory written with a constructor argument; copying an example class that has an injected constructor; upgrading a factory class that gained a required-arg constructor.
Related errors
- Cannot initialize AwsClientFactory, missing no-arg construct
- Cannot initialize DellClientFactory, %s does not implement D
- Cannot initialize AliyunClientFactory, missing no-arg constr
- Cannot initialize AwsClientFactory, %s does not implement Aw
- Cannot initialize S3FileIOAwsClientFactory, missing no-arg c
AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12).
Data as JSON: /api/errors/1121bda749e4e228.
Report an issue: GitHub.