|
Spring Framework example source code file (sql-error-codes.xml)
The Spring Framework sql-error-codes.xml source code<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd"> <!-- - Default SQL error codes for well-known databases. - Can be overridden by definitions in a "sql-error-codes.xml" file - in the root of the class path. - - If the Database Product Name contains characters that are invalid - to use in the id attribute (like a space) then we need to add a property - named "databaseProductName"/"databaseProductNames" that holds this value. - If this property is present, then it will be used instead of the id for - looking up the error codes based on the current database. --> <beans> <bean id="DB2" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="databaseProductName"> <value>DB2* </property> <property name="badSqlGrammarCodes"> <value>-007,-029,-097,-104,-109,-115,-128,-199,-204,-206,-301,-408,-441,-491 </property> <property name="dataAccessResourceFailureCodes"> <value>-904,-971 </property> <property name="dataIntegrityViolationCodes"> <value>-407,-530,-531,-532,-543,-544,-545,-603,-667,-803 </property> <property name="deadlockLoserCodes"> <value>-911,-913 </property> </bean> <bean id="Derby" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="databaseProductName"> <value>Apache Derby </property> <property name="useSqlStateForTranslation"> <value>true </property> <property name="badSqlGrammarCodes"> <value>42802,42821,42X01,42X02,42X03,42X04,42X05,42X06,42X07,42X08 </property> <property name="dataAccessResourceFailureCodes"> <value>04501,08004,42Y07 </property> <property name="dataIntegrityViolationCodes"> <value>22001,22005,23502,23503,23505,23513,X0Y32 </property> <property name="cannotAcquireLockCodes"> <value>40XL1 </property> <property name="deadlockLoserCodes"> <value>40001 </property> </bean> <bean id="H2" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="badSqlGrammarCodes"> <value>42000,42001,42101,42102,42111,42112,42121,42122,42132 </property> <property name="dataAccessResourceFailureCodes"> <value>90046,90100,90117,90121,90126 </property> <property name="dataIntegrityViolationCodes"> <value>22003,22012,22025,23000,23001 </property> </bean> <bean id="HSQL" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="databaseProductName"> <value>HSQL Database Engine </property> <property name="badSqlGrammarCodes"> <value>-22,-28 </property> <property name="dataAccessResourceFailureCodes"> <value>-80 </property> <property name="dataIntegrityViolationCodes"> <value>-9 </property> </bean> <bean id="Informix" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="databaseProductName"> <value>Informix Dynamic Server </property> <property name="badSqlGrammarCodes"> <value>-201,-217,-696 </property> <property name="dataIntegrityViolationCodes"> <value>-239,-268,-692,-11030 </property> </bean> <bean id="MS-SQL" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="databaseProductName"> <value>Microsoft SQL Server </property> <property name="badSqlGrammarCodes"> <value>156,170,207,208 </property> <property name="permissionDeniedCodes"> <value>229 </property> <property name="dataIntegrityViolationCodes"> <value>544,2601,2627,8114,8115 </property> <property name="deadlockLoserCodes"> <value>1205 </property> </bean> <bean id="MySQL" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="badSqlGrammarCodes"> <value>1054,1064,1146 </property> <property name="dataAccessResourceFailureCodes"> <value>1 </property> <property name="dataIntegrityViolationCodes"> <value>630,839,840,893,1062,1169,1215,1216,1217,1451,1452,1557 </property> <property name="cannotAcquireLockCodes"> <value>1205 </property> <property name="deadlockLoserCodes"> <value>1213 </property> </bean> <bean id="Oracle" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="badSqlGrammarCodes"> <value>900,903,904,917,936,942,17006 </property> <property name="invalidResultSetAccessCodes"> <value>17003 </property> <property name="dataAccessResourceFailureCodes"> <value>17002,17447 </property> <property name="dataIntegrityViolationCodes"> <value>1,1400,1722,2291,2292 </property> <property name="cannotAcquireLockCodes"> <value>54 </property> <property name="cannotSerializeTransactionCodes"> <value>8177 </property> <property name="deadlockLoserCodes"> <value>60 </property> </bean> <bean id="PostgreSQL" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="useSqlStateForTranslation"> <value>true </property> <property name="badSqlGrammarCodes"> <value>03000,42000,42601,42602,42622,42804,42P01 </property> <property name="dataAccessResourceFailureCodes"> <value>53000,53100,53200,53300 </property> <property name="dataIntegrityViolationCodes"> <value>23000,23502,23503,23505,23514 </property> <property name="cannotAcquireLockCodes"> <value>55P03 </property> <property name="cannotSerializeTransactionCodes"> <value>40001 </property> <property name="deadlockLoserCodes"> <value>40P01 </property> </bean> <bean id="Sybase" class="org.springframework.jdbc.support.SQLErrorCodes"> <property name="databaseProductNames"> <list> <value>Sybase SQL Server <value>Adaptive Server Enterprise <value>sql server </list> </property> <property name="badSqlGrammarCodes"> <value>101,102,103,104,105,106,107,108,109,110,111,112,113,116,120,121,123,207,208,213,257,512 </property> <property name="dataIntegrityViolationCodes"> <value>423,511,515,530,547,2601,2615,2714 </property> <property name="deadlockLoserCodes"> <value>1205 </property> </bean> </beans> Other Spring Framework examples (source code examples)Here is a short list of links related to this Spring Framework sql-error-codes.xml source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.