t8y2/dbx · error · SQLException
Failed to open JDBC connection
Error message
Failed to open JDBC connection
What it means
Fallback SQLException thrown by the connection-open path when a checked Throwable that is neither Error nor Exception escapes the open task (impossible for normal Java code, hence the defensive fallback). Real open failures usually surface as the original Exception rethrown directly; this message means an exotic Throwable type was seen.
Source
Thrown at agents/common/src/main/java/com/dbx/agent/JdbcConnectionPoolRegistry.java:1658
if (outcome.completeExceptionally(failure)) {
throw failure;
}
try {
return outcome.get();
} catch (ExecutionException error) {
throwOpenFailure(error.getCause());
throw new IllegalStateException("unreachable");
}
}
private static void throwOpenFailure(Throwable error) throws Exception {
if (error instanceof Error fatal) {
throw fatal;
}
if (error instanceof Exception exception) {
throw exception;
}
throw new SQLException("Failed to open JDBC connection", error);
}
@Override
public void close() {
executor.shutdownNow();
}
}
private static final class PhysicalConnectionBudget {
private final int maximum;
private final Semaphore permits;
private PhysicalConnectionBudget(int maximum) {
this.maximum = maximum;
this.permits = new Semaphore(maximum, true);
}
private void acquire(OperationDeadline deadline) throws SQLException {View on GitHub (pinned to c0390bff16)
Solutions
- Inspect getCause() to identify the exotic Throwable and its source
- Disable/probe instrumentation agents to see if one is injecting non-standard throwables
- Replace or update the offending driver/wrapper
- Report to the library maintainers with the full cause chain if it originates internally
Defensive patterns
Strategy: try-catch
Validate before calling
// Non-standard Throwables usually come from instrumentation; verify baseline:
try (Connection c = rawDataSource.getConnection()) { }
// if this passes but pooled open fails, probe agents/enhancers Type guard
static boolean isExoticOpenFailure(SQLException e) {
return "Failed to open JDBC connection".equals(e.getMessage())
&& e.getCause() != null
&& !((e.getCause() instanceof IOException) || (e.getCause() instanceof RuntimeException));
} Try / catch
try {
conn = pool.checkout();
} catch (SQLException e) {
if ("Failed to open JDBC connection".equals(e.getMessage())) {
log.error("open failed with exotic throwable:", e.getCause());
}
throw e;
} Prevention
- Audit JVM agents/APM instrumentation that modify JDBC classes
- Pin a known-good driver version; test upgrades in staging
- Keep the cause chain logged to identify the exotic Throwable source
- Report reproducible internal cases to library maintainers
When it happens
Trigger: Throwable subclasses like custom checked-throwable types thrown by a driver/factory inside the connection-open task that bypass the standard Exception rethrow branches.
Common situations: Instrumentation or bytecode-enhancement frameworks (agents, APM) injecting non-standard Throwables; highly unusual driver implementations violating Throwable conventions.
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/6152a77dc2ed6e5d.
Report an issue: GitHub.