{"record":{"id":"44742554625dc0d0","repo":"iflytek/astron-agent","slug":"no-field-information-found-please-check-if-the-data-is","errorCode":null,"errorMessage":"No field information found, please check if the data is correct!","messagePattern":"No field information found, please check if the data is correct!","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/database/DBTableExcelReadListener.java","lineNumber":115,"sourceCode":"                    throw new BusinessException(ResponseEnum.DATABASE_TABLE_ILLEGAL_DEFAULT);\n                }\n            }\n        }\n        dbTableFieldDto.setDefaultValue(row.get(3));\n        dbTableFieldDto.setIsRequired(\"是\".equals(row.get(4)));\n        tableFields.add(dbTableFieldDto);\n    }\n\n    /**\n     * Final callback after all rows are analyzed.\n     *\n     * @param analysisContext analysis context\n     * @throws IllegalArgumentException if no field information was found\n     */\n    @Override\n    public void doAfterAllAnalysed(AnalysisContext analysisContext) {\n        if (tableFields.isEmpty()) {\n            throw new IllegalArgumentException(\"No field information found, please check if the data is correct!\");\n        }\n    }\n}\n","sourceCodeStart":97,"sourceCodeEnd":119,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/backend/toolkit/src/main/java/com/iflytek/astron/console/toolkit/service/database/DBTableExcelReadListener.java#L97-L119","documentation":"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().","triggerScenarios":"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.","commonSituations":"Users submit the unmodified template; the populated sheet is not the one passed to EasyExcel.read; headers matched but the data area is blank.","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()."],"exampleFix":"// before: template uploaded with header row only -> 0 fields\n// after: add a row under the header, e.g.\n// 字段名*: name | 数据类型*: String | 描述*: user name | 默认值: (blank) | 是否必填*: 是","handlingStrategy":"validation","validationCode":"// pre-flight: ensure at least one complete data row exists under the header\ntry (var wb = org.apache.poi.ss.usermodel.WorkbookFactory.create(inputStream)) {\n    var sheet = wb.getSheetAt(0);\n    if (sheet.getLastRowNum() < 1) {\n        throw new IllegalArgumentException(\"No field definition rows found under the header\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    EasyExcel.read(file, listener).sheet().doRead();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"No field information found\")) {\n        // instruct user to add at least one field definition row\n    }\n}","preventionTips":["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."],"tags":["excel","easyexcel","empty-file","java"],"backgroundTag":"empty-result-set","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}