t8y2/dbx · error · IllegalArgumentException
Unsupported JDBC plugin method: " + method
Error message
Unsupported JDBC plugin method: " + method
What it means
DbxJdbcPlugin.handle dispatches JSON-RPC plugin methods to typed calls via a switch; the default arm throws IllegalArgumentException for any method name the JDBC plugin does not implement. This guards against unknown or unsupported RPC methods rather than failing later with a confusing NullPointerException or wrong-argument error.
Source
Thrown at plugins/jdbc/src/main/java/app/dbx/jdbc/DbxJdbcPlugin.java:475
optionalText(params, "schema"),
requireText(params, "name"),
requireText(params, "object_type")
);
case "getColumns" -> getColumns(
connection,
optionalText(params, "database"),
optionalText(params, "schema"),
requireText(params, "table")
);
case "getExplainInfo" -> getExplainInfo(
connection,
requireText(params, "sql"),
optionalText(params, "database"),
optionalText(params, "schema"),
nonNegativeInt(params, "timeoutSecs", -1),
optionalText(params, "mode")
);
default -> throw new IllegalArgumentException("Unsupported JDBC plugin method: " + method);
};
}
private static ObjectNode connectionTestResult(Connection connection) {
ObjectNode result = MAPPER.createObjectNode();
result.put("ok", true);
ObjectNode databaseInfo = databaseInfo(connection);
if (!databaseInfo.isEmpty()) {
result.set("databaseInfo", databaseInfo);
}
return result;
}
private static ObjectNode databaseInfoResult(Connection connection) {
ObjectNode result = MAPPER.createObjectNode();
ObjectNode databaseInfo = databaseInfo(connection);
if (!databaseInfo.isEmpty()) {
result.set("databaseInfo", databaseInfo);View on GitHub (pinned to c0390bff16)
Solutions
- Check the plugin's supported method list and send an exact, correctly-cased method name.
- Align client and plugin versions so the method exists on both sides.
- Catch IllegalArgumentException in handleLine's caller and return a JSON-RPC 'method not found' error to the client instead of crashing the dispatch.
Example fix
// before
send("jdbc.executeQuery", params); // wrong method name
// after
send("jdbc.query", params); // exact supported method name Defensive patterns
Strategy: try-catch
Validate before calling
Set<String> JDBC_METHODS = Set.of(/* e.g. "connect","query","execute",... as documented for the plugin */);
if (!JDBC_METHODS.contains(method)) {
// reject client-side before sending the RPC
} Try / catch
try {
result = plugin.handle(method, params);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unsupported JDBC plugin method")) {
respond(method, jsonRpcError(-32601, "Method not found: " + method));
} else throw e;
} Prevention
- Keep a shared constants file of supported method names on both client and plugin sides.
- Pin client and plugin versions together so new methods are never sent to older plugins.
- Use exact, case-sensitive method names; avoid routing non-JDBC methods to the JDBC plugin.
When it happens
Trigger: Sending a JSON-RPC request to the JDBC plugin whose "method" is not one of the handled names — e.g. a typo like "query.execute", a method added in a newer plugin version but sent to an older plugin, or a method belonging to a different plugin (e.g. a MongoDB-only method) routed to the JDBC plugin.
Common situations: Client/server version mismatch where the caller assumes a method exists; hand-written test payloads with misspelled method names; generic tooling that broadcasts the same method to all plugins; case-sensitivity issues ("Query" vs "query").
Related errors
- JDBC pool registry must be attached before connecting
- Not connected
- JDBC Session was quarantined while waiting for a connection
- Object source is not supported
- Completion assistant search is not supported by this agent
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/d1adbe53327647a0.
Report an issue: GitHub.