iflytek/astron-agent · error · IllegalArgumentException
No field information found, please check if the data is…
Error message
No field information found, please check if the data is correct!
What it means
DBTableExcelReadListener.doAfterAllAnalysed throws this IllegalArgumentException when the sheet finished parsing but no DbTableFieldDto rows were collected (tableFields is empty). Note rows are only added after per-row validation passes, so either the file had no data rows at all, or every row was rejected by an earlier BusinessException before reaching tableFields.add().
Solutions
- Add at least one complete, valid field definition row under the header.
- Ensure EasyExcel is pointed at the sheet that contains the field data (correct sheetNo/sheetName).
- Fix any per-row validation errors (empty required cells, illegal types) so rows actually reach tableFields.add().
Example fix
// before: template uploaded with header row only -> 0 fields // after: add a row under the header, e.g. // 字段名*: name | 数据类型*: String | 描述*: user name | 默认值: (blank) | 是否必填*: 是
Defensive patterns
Strategy: validation
Validate before calling
// pre-flight: ensure at least one complete data row exists under the header
try (var wb = org.apache.poi.ss.usermodel.WorkbookFactory.create(inputStream)) {
var sheet = wb.getSheetAt(0);
if (sheet.getLastRowNum() < 1) {
throw new IllegalArgumentException("No field definition rows found under the header");
}
} Try / catch
try {
EasyExcel.read(file, listener).sheet().doRead();
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("No field information found")) {
// instruct user to add at least one field definition row
}
} Prevention
- Add at least one complete field row before importing.
- Point EasyExcel at the correct sheet containing the field data.
- Resolve per-row validation errors so rows are actually collected.
When it happens
Trigger: Uploading a template with only the header row and no data rows; reading the wrong/empty sheet; in the theoretical case where per-row validation is bypassed or all rows fail before being added.
Common situations: Users submit the unmodified template; the populated sheet is not the one passed to EasyExcel.read; headers matched but the data area is blank.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No valid data in file, please check if excel data is…
- Header mismatch! Expected headers: , Actual headers:
- RESPONSE_FAILED
- Unable to parse boolean value: '
- DATABASE_TABLE_FIELD_IMPORT_DEFAULT
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/44742554625dc0d0.
Report an issue: GitHub.
Appendix: source
Thrown at console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/database/DBTableExcelReadListener.java:115
throw new BusinessException(ResponseEnum.DATABASE_TABLE_ILLEGAL_DEFAULT);
}
}
}
dbTableFieldDto.setDefaultValue(row.get(3));
dbTableFieldDto.setIsRequired("是".equals(row.get(4)));
tableFields.add(dbTableFieldDto);
}
/**
* Final callback after all rows are analyzed.
*
* @param analysisContext analysis context
* @throws IllegalArgumentException if no field information was found
*/
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
if (tableFields.isEmpty()) {
throw new IllegalArgumentException("No field information found, please check if the data is correct!");
}
}
}
View on GitHub (pinned to 5e758547a8)