You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A file based approach to override existing SQLState based classification and add new ones would be very useful (The same way it is currently provided for in SQL error-code based classification)
Currently the SQLStateSQLExceptionTranslator class classifies into four types of exceptions viz. BadSqlGrammarException, DataIntegrityViolationException, DataAccessResourceFailureException and ConcurrencyFailureException.
All the exception categories provided in SQLErrorCodeSQLExceptionTranslator need to be provided for SQL State based classification as well.
There is no classification for TransientDataAccessResourceException. This needs to be added as well.
Hi,
The original Fix Version for this jira was 2.5.6.
This issue is stopping us from adopting spring-based exception translation and replacing our homegrown one.
It would really help us comepletly replace our existing sql-state based error-handling if this could be provided in 2.5.6
Abhishek Gupta opened SPR-4899 and commented
REF: #9549 http://jira.springframework.org/browse/SPR-4873
Futher to jira:SPR-4873, there is a need to provide a hook for being able to add new SQL States that might be needed to classify exceptions.
Currently, the logic is hardcoded in the SQLStateSQLExceptionTranslator class and if a new SQLState needs to be classified there is no extensible way of doing this. Every database tends to have its own set of SQLStates (eg. Sybase sql-states mentioned in Improve classification of DB2 and Sybase exceptions by adding new error-state classifications [SPR-4873] #9549)
A file based approach to override existing SQLState based classification and add new ones would be very useful (The same way it is currently provided for in SQL error-code based classification)
Currently the SQLStateSQLExceptionTranslator class classifies into four types of exceptions viz. BadSqlGrammarException, DataIntegrityViolationException, DataAccessResourceFailureException and ConcurrencyFailureException.
All the exception categories provided in SQLErrorCodeSQLExceptionTranslator need to be provided for SQL State based classification as well.
There is no classification for TransientDataAccessResourceException. This needs to be added as well.
Affects: 2.5.2, 2.5.3, 2.5.4
Issue Links:
Referenced from: commits 9b1edea, 49549d6
The text was updated successfully, but these errors were encountered: