apache/seatunnel · error · HugeGraphConnectorException
ILLEGAL_CONFIG_ARGUMENT
ILLEGAL_CONFIG_ARGUMENT
Error message
The '%s' can't be null
What it means
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.
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
Example fix
// before
HugeGraph {
plugin_name = "HugeGraph"
// uri missing
}
// after
HugeGraph {
plugin_name = "HugeGraph"
uri = "http://hugegraph:8080"
} Defensive patterns
Strategy: validation
Validate before calling
if (config.getOptional("uri") == null) {
throw new IllegalArgumentException("uri is required for HugeGraph connector");
} Type guard
boolean hasOption(Map<String,Object> cfg, String key) { return cfg.get(key) != null; } Try / catch
try {
source.prepare(config);
} catch (HugeGraphConnectorException e) {
if (String.valueOf(e.getMessage()).matches("The '.*' can't be null")) {
// parse missing element name from message, fix config
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Both 'mappings' and 'schema_config' are present…
- HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT
- HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA
- ILLEGAL_CONFIG_ARGUMENT
- ILLEGAL_CONFIG_ARGUMENT
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/36dabfabae8e444c.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/utils/E.java:31
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.seatunnel.connectors.seatunnel.hugegraph.utils;
import org.apache.seatunnel.connectors.seatunnel.hugegraph.exception.HugeGraphConnectorErrorCode;
import org.apache.seatunnel.connectors.seatunnel.hugegraph.exception.HugeGraphConnectorException;
import javax.annotation.Nullable;
import java.util.Collection;
public final class E {
public static void checkNotNull(Object object, String elem) {
if (object == null) {
throw new HugeGraphConnectorException(
HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,
String.format("The '%s' can't be null", elem));
}
}
public static void checkNotNull(Object object, String elem, String owner) {
if (object == null) {
throw new HugeGraphConnectorException(
HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,
String.format("The '%s' of '%s' can't be null", elem, owner));
}
}
public static void checkNotEmpty(Collection<?> collection, String elem) {
if (collection == null) {
throw new HugeGraphConnectorException(
HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,
String.format("The '%s' can't be null", elem));View on GitHub (pinned to cf67b549a7)