Re: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0125E Function sequence error. SQ
Based on the symptom I expect you are using WebSphere with DB2 in your environment where the problem occurs.
The root of the problem is WebSphere's default configuration colliding with the DB2 driver driver's expectations regarding cursor holding.
In order to avoid the problem, set the CURSORHOLD paramter to "1". This can be done in the Admin Console. For the parameters to be entered you'd need to go to the General tab for each of the affected data sources and Add the following new attribute: Name = connectionAttribute Value = cursorhold=1
Alternatively, you can add the appropriate entries in the datasources.xml configuration file. Here, you'd need to insert the following line: