t8y2/dbx · error · IllegalArgumentException
Unsupported object type: null
Error message
Unsupported object type: null
What it means
FirebirdAgent.normalizeObjectSourceType only supports "PROCEDURE"; a null object type cannot be normalized, so it throws IllegalArgumentException immediately. The check exists so the agent never silently treats an unknown object kind as a procedure.
Source
Thrown at agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java:123
} else if (parameterType == 1) {
outputs.add(parameter);
} else {
throw new IllegalStateException("Unsupported Firebird parameter type: " + parameterType);
}
}
}
}
String source = !found || body == null || body.isBlank()
? ""
: buildProcedureDdl(name, inputs, outputs, body);
return new ObjectSource(name, normalizedType, schema, source, false);
});
}
static String normalizeObjectSourceType(String objectType) {
if (objectType == null) {
throw new IllegalArgumentException("Unsupported object type: null");
}
String normalized = objectType.trim().toUpperCase(Locale.ROOT);
if (!"PROCEDURE".equals(normalized)) {
throw new IllegalArgumentException("Unsupported object type: " + objectType);
}
return normalized;
}
private static String buildProcedureDdl(
String name,
List<ProcedureParameter> inputs,
List<ProcedureParameter> outputs,
String body
) {
StringBuilder ddl = new StringBuilder("CREATE OR ALTER PROCEDURE ")
.append(quoteIdentifier(name));
appendParameterBlock(ddl, inputs, " (");
if (inputs.isEmpty()) {View on GitHub (pinned to c0390bff16)
Solutions
- Pass objectType = "PROCEDURE" explicitly — Firebird in this driver only supports procedures.
- Handle null upstream: default or skip objects whose type is unknown before calling getObjectSource.
- If the object really is a table/function, use the appropriate agent/API instead of the Firebird procedure source path.
- Trim and uppercase the type value on your side before the call if it comes from external metadata.
Example fix
// before
agent.getObjectSource(conn, schema, name, row.getObjectType()); // may be null
// after
String type = row.getObjectType();
if (type == null || !type.trim().equalsIgnoreCase("PROCEDURE")) return; // skip unsupported
agent.getObjectSource(conn, schema, name, type); Defensive patterns
Strategy: type-guard
Validate before calling
// Java (caller side)
if (objectType == null || !objectType.trim().equalsIgnoreCase("PROCEDURE")) {
return Optional.empty(); // Firebird agent only supports procedures
} Type guard
// Java narrowing helper
static boolean isProcedure(String objectType) {
return objectType != null && "PROCEDURE".equals(objectType.trim().toUpperCase(Locale.ROOT));
}
if (isProcedure(objectType)) {
src = agent.getObjectSource(conn, schema, name, objectType);
} Try / catch
try {
src = agent.getObjectSource(conn, schema, name, objectType);
} catch (IllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Unsupported object type")) {
LOG.debug("Skipping Firebird object {} of type {}", name, objectType);
} else { throw e; }
} Prevention
- Only pass "PROCEDURE" to the Firebird agent — it is the sole supported object type.
- Filter null object types from upstream catalog rows before requesting sources.
- Normalize type strings (trim + uppercase) at the boundary of your code.
- Route table/view/function extraction to the appropriate driver agent instead of FirebirdAgent.
When it happens
Trigger: Calling getObjectSource (or normalizedType) on Firebird with objectType == null; also thrown when a non-null type trims/uppercases to something other than PROCEDURE.
Common situations: Object type coming from an upstream catalog where the type column is NULL for Firebird; callers passing "TABLE" or "FUNCTION" instead of the only supported "PROCEDURE"; lowercase or whitespace variants that would otherwise work but are null-checked first.
Related errors
- Agent runtime thread limits must be positive
- Databend procedure names with special characters are not sup
- Unsupported Firebird parameter type: {parameterType}
- Unsupported object type: {objectType}
- Missing Firebird field type for parameter {name}
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/059a9a1de2b9b75e.
Report an issue: GitHub.