apache/hadoop · error · ResourceEstimatorException
Could not instantiate : {} due to exception: {}
Error message
Could not instantiate : {} due to exception: {} What it means
Error "Could not instantiate : {} due to exception: {}" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-resourceestimator/src/main/java/org/apache/hadoop/resourceestimator/common/config/ResourceEstimatorUtil.java:73
}
try {
Class<?> concreteClass = Class.forName(className);
if (type.isAssignableFrom(concreteClass)) {
Constructor<T> meth =
(Constructor<T>) concreteClass.getDeclaredConstructor(EMPTY_ARRAY);
meth.setAccessible(true);
return meth.newInstance();
} else {
StringBuilder errMsg = new StringBuilder();
errMsg.append("Class: ").append(className).append(" not instance of ")
.append(type.getCanonicalName());
throw new ResourceEstimatorException(errMsg.toString());
}
} catch (ClassNotFoundException e) {
StringBuilder errMsg = new StringBuilder();
errMsg.append("Could not instantiate : ").append(className)
.append(" due to exception: ").append(e.getCause());
throw new ResourceEstimatorException(errMsg.toString());
} catch (ReflectiveOperationException e) {
StringBuilder errMsg = new StringBuilder();
errMsg.append("Could not instantiate : ").append(className)
.append(" due to exception: ").append(e.getCause());
throw new ResourceEstimatorException(errMsg.toString());
}
}
}
View on GitHub (pinned to 2add963021)
Solutions
- Ensure the configured class has a public no-arg constructor and is on the classpath; see the logged exception for the instantiation failure.
When it happens
Trigger: The resource estimator fails to instantiate a configured class via reflection, e.g. because it has no accessible no-arg constructor or its constructor throws.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/70223ac396d624e3.
Report an issue: GitHub.