apache/hadoop · error · RuntimeException
Class not found: {}
Error message
Class not found: {} What it means
Error "Class not found: {}" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-streaming/src/main/java/org/apache/hadoop/streaming/mapreduce/StreamInputFormat.java:80
context.progress();
// Open the file and seek to the start of the split
Path path = split.getPath();
FileSystem fs = path.getFileSystem(conf);
// open the file
final FutureDataInputStreamBuilder builder = fs.openFile(path);
FutureIO.propagateOptions(builder, conf,
MRJobConfig.INPUT_FILE_OPTION_PREFIX,
MRJobConfig.INPUT_FILE_MANDATORY_PREFIX);
FSDataInputStream in = FutureIO.awaitFuture(builder.build());
// Factory dispatch based on available params..
Class readerClass;
{
readerClass = StreamUtil.goodClassOrNull(conf, c, null);
if (readerClass == null) {
throw new RuntimeException("Class not found: " + c);
}
}
Constructor ctor;
try {
ctor = readerClass.getConstructor(new Class[] { FSDataInputStream.class,
FileSplit.class, TaskAttemptContext.class, Configuration.class,
FileSystem.class });
} catch (NoSuchMethodException nsm) {
throw new RuntimeException(nsm);
}
RecordReader<Text, Text> reader;
try {
reader = (RecordReader<Text, Text>) ctor.newInstance(new Object[] { in,
split, context, conf, fs });
} catch (Exception nsm) {
throw new RuntimeException(nsm);View on GitHub (pinned to 2add963021)
Solutions
- Add the named class to the job classpath or fix the configured class name.
When it happens
Trigger: The record reader class named in the streaming configuration cannot be found on the task classpath.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/5c41d3e23a47c337.
Report an issue: GitHub.