My environment:
AIX: v4.3.2
DB2: v5.2.0.30
Java: 1.1.6
WebSphere: v3.0.2 Standard
I am sporadically getting "DB2Exception: [IBM][CLI Driver] CLI0125E
Function sequence error. SQLSTATE=HY010".
The mystery is that this only happens occassionally. I can run the
exact same logic muliple times, and the error will only happen one out
of twenty times. The exception will usually happen as I am processing
through the result set. Sometimes on the 1st row, but sometimes on the
5th or 10th or 22nd or you get the idea… Sometimes however, I will get
this exception on the executeQuery statement.
In addition, this occurs when noone else is logged into the system, so I
don't think it's a contention issue. Lastly, we have our data split
into multiple databases that have the same data structure. The
exception has occurred on more than one of the databases.
My code looks something like this:
String sqlQuery;
Statement statement;
ResultSet resultSet;
... dataConnection established here ...
try {
statement = dataConnection.createStatement();
sqlQuery = "SELECT COLUMN1, COLUMN2, COLUMN3, COLUMN4";
sqlQuery += " FROM DB2_TABLE WHERE";
sqlQuery += " COLUMN1 = 'abc'";
sqlQuery += " AND COLUMN2 = '123'";
resultSet = statement.executeQuery(sqlQuery);
} catch (Exception e) {
// The exception SOMETIMES occurs here!
}
try {
while (resultSet.next()) {
// Normal processing here...
}
} catch (Exception e) {
// The exception MOST OFTEN occurs here!
}
Does anyone have any idea why this might be happening.
Thanks for your help,
Jim Ross
BJC Health System
St. Louis, MO
Sent via Deja.com http://www.deja.com/
Before you buy.
Hello Jim and the world!
I am getting the same exception on trying the VisualAge for JAVA EJB
Example: Increment.
But it is not as sporadic as yours. Always the second sql-statement in
the the TestClient (calling increment on the remote interface) causes
the exception.
Mischa
--
U arent lonesome in the world