{"record":{"id":"0c09ab9781bf6a72","repo":"apache/seatunnel","slug":"config-validation-failed-0c09ab","errorCode":"CONFIG_VALIDATION_FAILED","errorMessage":"Invalid Field","messagePattern":"Invalid Field","errorType":"error_code","errorClass":"Neo4jConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/config/DriverBuilder.java","lineNumber":77,"sourceCode":"            configBuilder\n                    .withConnectionAcquisitionTimeout(\n                            maxConnectionTimeoutSeconds * 2, TimeUnit.SECONDS)\n                    .withConnectionTimeout(maxConnectionTimeoutSeconds, TimeUnit.SECONDS);\n        }\n        if (maxTransactionRetryTimeSeconds != null) {\n            configBuilder.withMaxTransactionRetryTime(\n                    maxTransactionRetryTimeSeconds, TimeUnit.SECONDS);\n        }\n        Config config = configBuilder.build();\n\n        if (username != null) {\n            return GraphDatabase.driver(uri, AuthTokens.basic(username, password), config);\n        } else if (bearerToken != null) {\n            return GraphDatabase.driver(uri, AuthTokens.bearer(bearerToken), config);\n        } else if (kerberosTicket != null) {\n            return GraphDatabase.driver(uri, AuthTokens.kerberos(kerberosTicket), config);\n        }\n        throw new Neo4jConnectorException(\n                SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED, \"Invalid Field\");\n    }\n}\n","sourceCodeStart":59,"sourceCodeEnd":81,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-neo4j/src/main/java/org/apache/seatunnel/connectors/seatunnel/neo4j/config/DriverBuilder.java#L59-L81","documentation":"DriverBuilder.build() creates a Neo4j Driver using one of three auth schemes (basic username/password, bearer token, kerberos ticket). If none of these credential fields is present after option validation, it throws Neo4jConnectorException with SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED and the terse message 'Invalid Field'. It means the sink/source configuration is missing any usable authentication method.","triggerScenarios":"Creating a Neo4j source/sink whose config has neither username+password, bearer token, nor kerberos ticket set — e.g. omitting 'username'/'password' options or misnaming them in the HOCON config.","commonSituations":"Copy-pasting a config template without filling auth fields; typo'd option names (so OptionValidation passes defaults but fields are null); switching from password to token auth and deleting both.","solutions":["Add username and password to the Neo4j connector config, or provide a bearer token / kerberos ticket","Verify option names against Neo4jSource/SinkOptions (password, bearer-token, kerberos-ticket) — typos silently leave fields null","Run with ConfigBuilder/checkConfig to catch missing required options before job submission"],"exampleFix":"// before\nNeo4j { uri = \"bolt://localhost:7687\" query = \"...\" } // no auth\n// after\nNeo4j { uri = \"bolt://localhost:7687\" username = \"neo4j\" password = \"secret\" query = \"...\" }","handlingStrategy":"validation","validationCode":"boolean authOk = config.hasPath(\"username\") && config.hasPath(\"password\") || config.hasPath(\"bearer-token\") || config.hasPath(\"kerberos-ticket\");","typeGuard":null,"tryCatchPattern":"try { sink.write(row); } catch (Neo4jConnectorException e) { if (e.getMessage().equals(\"Invalid Field\")) { throw new IllegalArgumentException(\"missing neo4j auth config\", e); } throw e; }","preventionTips":["Always set username+password or an explicit auth alternative","Verify option names against the connector's Option definitions","Run config validation before submitting the job"],"tags":["java","neo4j","config","authentication"],"backgroundTag":"missing-credentials","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}