apache/shardingsphere · error · UnknownSQLException
0
0
Error message
Unknown exception.
What it means
Error "Unknown exception." thrown in apache/shardingsphere.
Source
Thrown at infra/executor/src/main/java/org/apache/shardingsphere/infra/executor/sql/execute/engine/SQLExecutorExceptionHandler.java:66
* @return throw exception if error occur or not
*/
public static boolean isExceptionThrown() {
return IS_EXCEPTION_THROWN.get();
}
/**
* Handle exception.
*
* @param exception to be handled exception
* @throws SQLException SQL exception
*/
public static void handleException(final Exception exception) throws SQLException {
if (isExceptionThrown()) {
IS_EXCEPTION_THROWN.remove();
if (exception instanceof SQLException) {
throw (SQLException) exception;
}
throw new UnknownSQLException(exception).toSQLException();
}
IS_EXCEPTION_THROWN.remove();
log.error("exception occur: ", exception);
}
}
View on GitHub (pinned to e952770a21)
Solutions
- Look up the SQL state and error code in the wrapped exception for the real cause.
- Verify the underlying data source is healthy and reachable.
- Retry the statement after resolving the root database error.
When it happens
Trigger: SQLExecutorExceptionHandler receives an execution failure with no parseable SQL exception details.
Common situations: Driver-level failures during parallel SQL execution where the original exception is not a SQLException.
AI-assisted analysis of apache/shardingsphere@e952770a21 (2026-08-14).
Data as JSON: /api/errors/26a74e376a84a327.
Report an issue: GitHub.