{"record":{"id":"e2e9ff226d05ee15","repo":"apache/seatunnel","slug":"reader-operation-failed","errorCode":"READER_OPERATION_FAILED","errorMessage":"Failed to read Neo4j table '${tableId}'.","messagePattern":"Failed to read Neo4j table '(.+?)'\\.","errorType":"error_code","errorClass":"Neo4jConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/source/Neo4jSourceReader.java","lineNumber":150,"sourceCode":"            this.context.signalNoMoreElement();\n        }\n    }\n\n    private void readTable(Collector<SeaTunnelRow> output, Neo4jSourceTableConfig tableConfig) {\n        final Query query = new Query(tableConfig.getQuery());\n        try {\n            session.readTransaction(\n                    tx -> {\n                        final Result result = tx.run(query);\n                        result.stream()\n                                .forEach(row -> output.collect(convertRecord(row, tableConfig)));\n                        return null;\n                    });\n        } catch (RuntimeException exception) {\n            if (tableConfig.getTableId() == null) {\n                throw exception;\n            }\n            throw new Neo4jConnectorException(\n                    CommonErrorCodeDeprecated.READER_OPERATION_FAILED,\n                    \"Failed to read Neo4j table '\" + tableConfig.getTableId() + \"'.\",\n                    exception);\n        }\n    }\n\n    static SeaTunnelRow convertRecord(Record record, Neo4jSourceTableConfig tableConfig) {\n        SeaTunnelRowType rowType = tableConfig.getRowType();\n        Object[] fields = new Object[rowType.getTotalFields()];\n        for (int i = 0; i < rowType.getTotalFields(); i++) {\n            String fieldName = rowType.getFieldName(i);\n            SeaTunnelDataType<?> fieldType = rowType.getFieldType(i);\n            Value value = record.get(fieldName);\n            fields[i] = convertType(fieldType, value);\n        }\n        SeaTunnelRow seaTunnelRow = new SeaTunnelRow(fields);\n        if (tableConfig.getTableId() != null) {\n            seaTunnelRow.setTableId(tableConfig.getTableId());","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/source/Neo4jSourceReader.java#L132-L168","documentation":"While reading a specific Neo4j table (executing its Cypher query via the driver), a RuntimeException occurred. readTable wraps it in Neo4jConnectorException with code READER_OPERATION_FAILED and includes the table id, preserving the original as cause. If tableId is null, the original exception propagates unchanged.","triggerScenarios":"internalPollNext -> readTable executes the table's query with executeRead(tx -> ...); any RuntimeException from the driver (query syntax error, connection loss, timeout) is wrapped with \"Failed to read Neo4j table '<tableId>'.\"","commonSituations":"Invalid Cypher syntax in tables_configs/root query; Neo4j server restart or network partition mid-read; auth/permission errors executing the query; driver timeouts on large result sets.","solutions":["Read the cause of the Neo4jConnectorException for the actual driver/Cypher error.","Validate the Cypher query directly against the Neo4j server (browser/shell).","Check Neo4j availability, credentials, and query timeouts; increase driver timeout or add pagination for large results."],"exampleFix":"// before\nquery = \"MATCH (n:Persn) RETURN n.name AS name\"\n// after\nquery = \"MATCH (n:Person) RETURN n.name AS name\"","handlingStrategy":"try-catch","validationCode":"// Validate queries up front:\ntables_configs.forEach(c -> driver.session().run(\"EXPLAIN \" + c.getQuery()).consume());","typeGuard":null,"tryCatchPattern":"try {\n  readTable(tableConfig);\n} catch (Neo4jConnectorException e) {\n  log.error(\"table={} failed: {}\", tableConfig.getTableId(), e.getCause());\n  throw e;\n}","preventionTips":["EXPLAIN every Cypher query before deployment.","Check Neo4j health/credentials before job start.","Set sane driver timeouts; page large results with LIMIT + skip."],"tags":["neo4j","read-failure","cypher"],"backgroundTag":"database-query-failed","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}