apache/seatunnel · error · IllegalArgumentException
The S3A credentials provider class
Error message
The S3A credentials provider class '%s' configured via '%s' is abstract and cannot be instantiated. Please configure a concrete AWS credentials provider class.
What it means
Thrown by S3HadoopConf when the configured S3A credentials provider class passes the interface check but is declared abstract. An abstract class cannot be instantiated reflectively, so validation rejects it early with this IllegalArgumentException instead of failing later with InstantiationException during S3 client creation.
Solutions
- Configure the concrete subclass instead of the abstract base class
- If no concrete implementation exists, write one that extends the abstract class and implements remaining abstract methods, then reference that class in config
- Prefer built-in concrete providers (EnvironmentVariableCredentialsProvider, SystemPropertyCredentialsProvider, ProfileCredentialsProvider)
Example fix
// before s3.aws.credentials-provider-class = "com.example.AbstractRoleProvider" // after s3.aws.credentials-provider-class = "com.example.ConcreteRoleProvider"
Defensive patterns
Strategy: validation
Validate before calling
Class<?> c = Class.forName(conf.get("s3a.aws.credentials-provider-class"));
if (Modifier.isAbstract(c.getModifiers()))
throw new IllegalArgumentException(c.getName() + " is abstract; configure a concrete class"); Prevention
- Never reference abstract base classes in provider config; point to concrete subclasses
- Test provider instantiation (newInstance) in a unit test before deploying config
When it happens
Trigger: S3A_AWS_CREDENTIALS_PROVIDER_CLASS points at an abstract base class (e.g. a custom AbstractCredentialsProvider or an abstract SDK base implementation) that implements the provider interface but has no concrete constructor.
Common situations: Developers subclass an abstract provider for customization but configure the abstract parent instead of the concrete subclass; copying an example config that references an SDK internal abstract class.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- The S3A credentials provider class
- At least one sink plugin must be configured.
- At least one source plugin must be configured.
- AzureCosmosDB requires uri, endpoint, or connection string…
- Cannot specify both ' ' and root-level ' '.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9862571ad89f14e1.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-s3/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/s3/config/S3HadoopConf.java:223
*
* <p>The caller resolves both classes through the same candidate classloader. If either class
* is unavailable it tries the next loader, so an isolated thread context classloader cannot
* bypass validation when the connector classloader can perform it.
*/
private static void assertImplementsCredentialsProvider(
Class<?> providerClass, Class<?> providerInterface) {
if (!providerInterface.isAssignableFrom(providerClass)) {
throw new IllegalArgumentException(
String.format(
"The S3A credentials provider class '%s' does not implement '%s'. "
+ "Please check the value of '%s' and configure a class that "
+ "implements the AWS credentials provider contract.",
providerClass.getName(),
AWS_CREDENTIALS_PROVIDER_INTERFACE,
S3FileBaseOptions.S3A_AWS_CREDENTIALS_PROVIDER_CLASS.key()));
}
if (Modifier.isAbstract(providerClass.getModifiers())) {
throw new IllegalArgumentException(
String.format(
"The S3A credentials provider class '%s' configured via '%s' is "
+ "abstract and cannot be instantiated. Please configure a "
+ "concrete AWS credentials provider class.",
providerClass.getName(),
S3FileBaseOptions.S3A_AWS_CREDENTIALS_PROVIDER_CLASS.key()));
}
}
private static ClassLoader[] credentialsProviderClassLoaders() {
return new ClassLoader[] {
Thread.currentThread().getContextClassLoader(), S3HadoopConf.class.getClassLoader()
};
}
}
View on GitHub (pinned to cf67b549a7)