{"record":{"id":"36dabfabae8e444c","repo":"apache/seatunnel","slug":"illegal-config-argument-36dabf","errorCode":"ILLEGAL_CONFIG_ARGUMENT","errorMessage":"The '%s' can't be null","messagePattern":"The '(.+?)' can't be null","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/E.java","lineNumber":31,"sourceCode":" * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.seatunnel.connectors.seatunnel.hugegraph.utils;\n\nimport org.apache.seatunnel.connectors.seatunnel.hugegraph.exception.HugeGraphConnectorErrorCode;\nimport org.apache.seatunnel.connectors.seatunnel.hugegraph.exception.HugeGraphConnectorException;\n\nimport javax.annotation.Nullable;\n\nimport java.util.Collection;\n\npublic final class E {\n\n    public static void checkNotNull(Object object, String elem) {\n        if (object == null) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\"The '%s' can't be null\", elem));\n        }\n    }\n\n    public static void checkNotNull(Object object, String elem, String owner) {\n        if (object == null) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\"The '%s' of '%s' can't be null\", elem, owner));\n        }\n    }\n\n    public static void checkNotEmpty(Collection<?> collection, String elem) {\n        if (collection == null) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    String.format(\"The '%s' can't be null\", elem));","sourceCodeStart":13,"sourceCodeEnd":49,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/E.java#L13-L49","documentation":"Utility assertion E.checkNotNull in the HugeGraph connector that throws ILLEGAL_CONFIG_ARGUMENT when a required object (typically a config option or parameter, identified by name 'elem') is null. It is a fail-fast guard so the connector never proceeds with missing required values.","triggerScenarios":"Any connector code path calling E.checkNotNull with a null value — typically a required config option absent from the job config or a null field at sink/source build time.","commonSituations":"Forgetting a mandatory HugeGraph option (e.g. uri, graph name) in the HOCON config; typo in option name so default null is used; programmatically-built configs leaving a field unset.","solutions":["Add the missing option named in the message to the connector config","Check for typos in the option key and match the documented Option name","Set the value programmatically if constructing configs in code"],"exampleFix":"// before\nHugeGraph {\n  plugin_name = \"HugeGraph\"\n  // uri missing\n}\n// after\nHugeGraph {\n  plugin_name = \"HugeGraph\"\n  uri = \"http://hugegraph:8080\"\n}","handlingStrategy":"validation","validationCode":"if (config.getOptional(\"uri\") == null) {\n    throw new IllegalArgumentException(\"uri is required for HugeGraph connector\");\n}","typeGuard":"boolean hasOption(Map<String,Object> cfg, String key) { return cfg.get(key) != null; }","tryCatchPattern":"try {\n    source.prepare(config);\n} catch (HugeGraphConnectorException e) {\n    if (String.valueOf(e.getMessage()).matches(\"The '.*' can't be null\")) {\n        // parse missing element name from message, fix config\n    }\n    throw e;\n}","preventionTips":["Cross-check config keys against connector documentation","Validate required options in CI with a dry-run job","Avoid hand-typed keys; copy from official examples"],"tags":["hugegraph","null-check","config"],"backgroundTag":"missing-required-config-field","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}