spring-framework / org.springframework.jdbc.support / SQLStateSQLExceptionTranslator

SQLStateSQLExceptionTranslator

open class SQLStateSQLExceptionTranslator : AbstractFallbackSQLExceptionTranslator

SQLExceptionTranslator implementation that analyzes the SQL state in the SQLException based on the first two digits (the SQL state "class"). Detects standard SQL state values and well-known vendor-specific SQL states.

Not able to diagnose all problems, but is portable between databases and does not require special initialization (no database vendor detection, etc.). For more precise translation, consider SQLErrorCodeSQLExceptionTranslator.

Author
Rod Johnson

Author
Juergen Hoeller

Author
Thomas Risberg

See Also
java.sql.SQLException#getSQLState()SQLErrorCodeSQLExceptionTranslator

Constructors

<init>

SQLStateSQLExceptionTranslator()

SQLExceptionTranslator implementation that analyzes the SQL state in the SQLException based on the first two digits (the SQL state "class"). Detects standard SQL state values and well-known vendor-specific SQL states.

Not able to diagnose all problems, but is portable between databases and does not require special initialization (no database vendor detection, etc.). For more precise translation, consider SQLErrorCodeSQLExceptionTranslator.