apache/seatunnel · error · FileConnectorException
COMMON_ERROR_CODE-14
COMMON_ERROR_CODE-14
Error message
Create orc reader for this file [%s] failed
What it means
While building the row type for an ORC file, opening the ORC Reader itself threw an IOException; it is rewrapped as READER_OPERATION_FAILED ('Create orc reader for this file [%s] failed'). This happens during schema inference / type resolution before any rows are read, so the file could not even be opened as ORC.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/OrcReadStrategy.java:202
throw new FileConnectorException(
CommonErrorCodeDeprecated.TABLE_SCHEMA_GET_FAILED,
String.format(
"Column [%s] does not exists in table schema [%s]",
readColumns.get(i), String.join(",", fieldNames)));
}
types[i] =
orcDataType2SeaTunnelDataType(
schema.getChildren().get(index),
configRowType != null && configRowType.getTotalFields() > i
? configRowType.getFieldType(i)
: null);
}
seaTunnelRowType = new SeaTunnelRowType(fields, types);
seaTunnelRowTypeWithPartition = mergePartitionTypes(path, seaTunnelRowType);
return getActualSeaTunnelRowTypeInfo();
} catch (IOException e) {
String errorMsg = String.format("Create orc reader for this file [%s] failed", path);
throw new FileConnectorException(
CommonErrorCodeDeprecated.READER_OPERATION_FAILED, errorMsg, e);
}
}
@Override
boolean checkFileType(String path) {
try {
boolean checkResult;
FSDataInputStream in = hadoopFileSystemProxy.getInputStream(path);
// try to get Postscript in orc file
long size = hadoopFileSystemProxy.getFileStatus(path).getLen();
int readSize = (int) Math.min(size, MIN_SIZE);
in.seek(size - readSize);
ByteBuffer buffer = ByteBuffer.allocate(readSize);
in.readFully(
buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining());
int psLen = buffer.get(readSize - 1) & 0xff;
int len = OrcFile.MAGIC.length();View on GitHub (pinned to cf67b549a7)
Solutions
- Check the cause stack trace for the underlying IOException (path not found, auth, corruption).
- Verify the file path exists and is accessible from the job's runtime environment.
- Validate the ORC file footer with orc-tools (orcmeta/orcfiledump).
- Confirm filesystem credentials/config (e.g. S3/HDFS) are present in the job environment.
Example fix
// before: path typo path = "/data/events.orc" // file actually at /data/event.orc // after path = "/data/event.orc"
Defensive patterns
Strategy: try-catch
Validate before calling
// verify the file opens as ORC before job submission orc-tools meta /path/file.orc > /dev/null && echo ok
Try / catch
try { rowType = strategy.getSeaTunnelRowTypeInfo(path); } catch (FileConnectorException e) { if (e.getMessage().startsWith("Create orc reader")) { log.error("Cannot open ORC file {} due to:", path, e.getCause()); } throw e; } Prevention
- Confirm paths and credentials before running the job
- Validate ORC footers with orc-tools after each upstream write
- Watch for files deleted between enumeration and read
- Ensure Hadoop/S3 configs are present in the runtime classpath
When it happens
Trigger: getSeaTunnelRowTypeInfoWithUserConfigRowType() constructing the ORC Reader for path; IOException from the underlying ORC library (file not found, unreadable, corrupt footer, unsupported filesystem).
Common situations: Wrong path or file deleted between split enumeration and read; missing Hadoop/S3 credentials for the filesystem; corrupt or truncated ORC file with unreadable footer; permission denied on the file.
Understand the failure class
Background: "open() failed", "failed to open file", "cannot create file" — what a file open error means and how to fix it — this error's family across 42 libraries.
Related errors
- FILE_TYPE_INVALID
- Circular condition chain detected: '%s' already exists in th
- Condition for option '%s' has a null operator
- String json deserialization exception.<content>
- WRITER_OPERATION_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2e8fd2d159c11019.
Report an issue: GitHub.