t8y2/dbx · warning · UnsupportedOperationException
Object source is not supported
Error message
Object source is not supported
What it means
BaseDatabaseAgent provides a default getObjectSource implementation that deliberately throws UnsupportedOperationException: this base agent (or the driver it wraps) cannot retrieve DDL/source text for database objects. It is an intentional capability gap, not a defect.
Source
Thrown at agents/common/src/main/java/com/dbx/agent/BaseDatabaseAgent.java:20
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
public abstract class BaseDatabaseAgent implements DatabaseAgent {
@Override
public List<ObjectInfo> listObjects(String schema) {
List<ObjectInfo> result = new ArrayList<>();
for (TableInfo table : listTables(schema)) {
result.add(new ObjectInfo(table.getName(), table.getTable_type(), schema, table.getComment()));
}
return result;
}
@Override
public ObjectSource getObjectSource(String schema, String name, String objectType) {
throw new UnsupportedOperationException("Object source is not supported");
}
@Override
public CompletionAssistantResponse completionAssistantSearch(CompletionAssistantRequest request) {
throw new UnsupportedOperationException("Completion assistant search is not supported by this agent");
}
@Override
public String getTableDdl(String schema, String table) {
List<IndexInfo> indexes;
try {
indexes = listIndexes(schema, table);
} catch (RuntimeException e) {
indexes = Collections.emptyList();
}
List<ForeignKeyInfo> foreignKeys;
try {View on GitHub (pinned to c0390bff16)
Solutions
- Use an agent subclass that overrides getObjectSource for your database
- Skip source retrieval when the agent doesn't support it (catch or feature-check)
- Implement getObjectSource in your custom agent using driver-specific catalog queries
- Request or contribute support for this driver's object-source extraction
Example fix
// before
String ddl = agent.getObjectSource(schema, table, "TABLE"); // throws
// after
String ddl = agent.supportsObjectSource()
? agent.getObjectSource(schema, table, "TABLE")
: null; Defensive patterns
Strategy: try-catch
Try / catch
try {
ObjectSource src = agent.getObjectSource(schema, name, objectType);
} catch (UnsupportedOperationException e) {
ObjectSource src = null; // capability not available on this agent
} Prevention
- Maintain a capability matrix of which agent implementations support object source
- Feature-detect before showing source-dependent UI
- Prefer specialized agent subclasses for DDL/source retrieval
- Handle UnsupportedOperationException uniformly across metadata APIs
When it happens
Trigger: Calling getObjectSource(schema, name, objectType) on an agent subclass that does not override it (a driver lacking source extraction support).
Common situations: Generic metadata tooling calling getObjectSource uniformly across all database agents; a driver migrated to the base class where source retrieval was previously handled by a specialized subclass.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Object source is not supported
- Completion assistant search is not supported by this agent
- Object source is not supported
- Transactions are not supported by this JDBC driver
- Object source not found
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/603b6c1f213e8d52.
Report an issue: GitHub.