prachik
prachik

Reputation: 31

Getting Error : SQLErrorCodes loaded: Spring jdbc connection

I am getting below error when I am trying to insert row in database and also while calling prepared statement:

INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
07:05:53,727  INFO SQLErrorCodesFactory:126 - SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]

Also below is insert statement:

String sql = " INSERT INTO customer_Table (customer_no ,customer_name ,address_no ,phone_no"
+ " ,email_addr  ,customer_type_code ,city_code ,language_code ,input_user_id ,input_timestamp ,last_update_user_id ,last_update_timestamp"
                    + ")    VALUES ( '"
                    + customerNumber2
                    + "' ,UPPER('"
                    + getTrimmedString(customerName,300)
                    + "') , '"
                    + addSeqNum2
                    + "'"
                    + ",'"
                    + processForNull(getTrimmedString(helperObject.getData().getVisitPhone(),30))
                    + "','"
                    + processForNull(getTrimmedString(helperObject.getData()
                            .getVisitEmailAddress(),256))
                    + "','001','"
                    + helperObject.getCityCode()
                    + "', 'en','SYSTEM',SYSDATE+-1/24,'SYSTEM',SYSDATE+-1/21)";
jdbcTemplate.update(sql);

Because of this error code is not executing completely. I am also not getting full stack of error.

Can anyone help me please.

Upvotes: 2

Views: 4131

Answers (1)

harricane
harricane

Reputation: 11

  1. Length of background parameter, exceeding the length defined by the field in the database
  2. The data type of descendant parameters conflicts with the data type of the field in the database

Upvotes: 1

Related Questions