Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DB2 ERRORCODE=-4229, SQLSTATE=null

Tags:

db2

I'm getting this error while executing a batch operation. Use getNextException() to retrieve the exceptions for specific batched elements.ERRORCODE=-4229, SQLSTATE=null

I'm not finding any pointer to proceed with debugging this error.

Appreciating any help!!!

like image 816
Java_User Avatar asked Aug 06 '13 07:08

Java_User


People also ask

Is an undefined name Sqlcode =- 204?

-204 name IS AN UNDEFINED NAME If the version-ID was not explicitly specified, the statement attempted to process the null version for the identified package, but the null version does not exist. The VERSION clause can be used to specify a specific version to be processed.

What is error in DB2?

The DB2 error states that DB2 failed to insert the new record into the due to a primary key constraint violation. This means that there is already a record in the TI_APGROUP_0 table that has the same CATENTRY_ID value as the record you are attempting to insert.


3 Answers

Search for the error on the IBM page:

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.java%2Fsrc%2Ftpc%2Fimjcc_rjvjcsqc.htm

-4229 Message text: text-from-getMessage Explanation: An error occurred during a batch execution.

User response: Call SQLException.getMessage to retrieve specific information about the problem.

So, it might be related to any underlying error during the execution of your batch insert/update/delete

like image 195
Panthro Avatar answered Oct 26 '22 11:10

Panthro


For those who are looking for an solution to this error.

For me this was due to

THE INSERT OR UPDATE VALUE OF FOREIGN KEY constraint-name IS INVALID. DB2 SQL Error: SQLCODE=-530, SQLSTATE=23503

like image 30
Java_User Avatar answered Oct 26 '22 10:10

Java_User


In my case, this occurred because I had an unique covering index defined on two columns and the combination of these two values was not unique when I was inserting the records.

like image 1
User2709 Avatar answered Oct 26 '22 10:10

User2709