{"record":{"id":"839cc01d7f8b1ab8","repo":"apache/seatunnel","slug":"config-validation-failed-839cc0","errorCode":"CONFIG_VALIDATION_FAILED","errorMessage":"PluginName: %s, PluginType: %s, Message: %s","messagePattern":"PluginName: (.+?), PluginType: (.+?), Message: (.+?)","errorType":"error_code","errorClass":"Neo4jConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/sink/Neo4jSinkWriter.java","lineNumber":114,"sourceCode":"        writeBuffer.add(new SeaTunnelRowNeo4jValue(seaTunnelRowType, element));\n        tryWriteByBatchSize();\n    }\n\n    private void tryWriteByBatchSize() {\n        if (!writeBuffer.isEmpty() && writeBuffer.size() >= maxBatchSize) {\n            Query query = batchQuery();\n            writeByQuery(query);\n            writeBuffer.clear();\n        }\n    }\n\n    private Query batchQuery() {\n        try {\n            Value batchValues = Values.parameters(CypherEnum.BATCH.getValue(), writeBuffer);\n            return new Query(neo4jSinkQueryInfo.getQuery(), batchValues);\n        } catch (ClientException e) {\n            log.error(\"Failed to build cypher statement\", e);\n            throw new Neo4jConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    String.format(\n                            \"PluginName: %s, PluginType: %s, Message: %s\",\n                            PLUGIN_NAME, PluginType.SINK, e.getMessage()));\n        }\n    }\n\n    private void writeByQuery(Query query) {\n        try {\n            session.writeTransaction(\n                    tx -> {\n                        tx.run(query);\n                        return null;\n                    });\n        } catch (Neo4jException e) {\n            throw new Neo4jConnectorException(\n                    Neo4jConnectorErrorCode.DATE_BASE_ERROR, e.getMessage());\n        }","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/sink/Neo4jSinkWriter.java#L96-L132","documentation":"Neo4jSinkWriter.batchQuery() wraps the buffered parameters and the configured Cypher query into an org.neo4j.driver Query. If the Neo4j driver's Values.parameters() or Query construction raises a ClientException (e.g. invalid parameter types such as unsupported nested values), the writer rethrows it as Neo4jConnectorException with CONFIG_VALIDATION_FAILED, prefixing the plugin name, type, and the driver's message.","triggerScenarios":"writeBuffer containing values the Neo4j driver cannot serialize into query parameters (unsupported types, deeply nested SeaTunnel values); a malformed query string causing the driver to reject the Query before execution.","commonSituations":"Passing SeaTunnel Map/Array fields that map to unsupported parameter types; query text with syntax problems caught at construction; upgrading the driver where serialization rules tightened.","solutions":["Inspect the wrapped driver message (the 'Message: %s' part) for the specific parameter or syntax problem","Convert buffered fields to Neo4j-supported types (primitives, String, lists, maps of primitives) before write","Validate the Cypher query syntax independently (e.g. in Neo4j Browser)","Log/inspect writeBuffer contents to find the offending value"],"exampleFix":"// before\nrow.getField(2) // SeaTunnel Decimal -> unsupported parameter\n// after\n((Decimal) row.getField(2)).toBigDecimal().doubleValue() // convert to supported type","handlingStrategy":"try-catch","validationCode":"// pre-check that buffered values are Neo4j-serializable primitives/lists/maps before write","typeGuard":null,"tryCatchPattern":"try { writer.write(row); } catch (Neo4jConnectorException e) { if (e.getMessage().contains(\"PluginName\")) { log.error(\"cypher build failed: {}\", e.getMessage()); } throw e; }","preventionTips":["Use only Neo4j-supported parameter types in mapped fields","Test the Cypher query with representative data in Neo4j Browser","Keep driver and connector versions aligned"],"tags":["java","neo4j","cypher","serialization"],"backgroundTag":"invalid-config-value","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"}