suche 36x36
Latest versionsfixlist
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IT28261 Status: Closed

JAVA.LANG.CLASSCASTEXCEPTION DURING EXECUTEBATCH() WITH
SQLJAVOIDTIMESTAMPCONVERSION

product:
DB2 CONNECT / DB2CONNCT / B10 - DB2
Problem description:
Description : While doing a batch insert of a timestamp with a
batch size greater than 1 and the property
SqljAvoidTimeStampConversion is set to true, ClassCastException
is thrown. This behavior is seen in jcc drivers  Jcc driver 4.23
and 4.24.
DataSource.setSqljAvoidTimeStampConversion(true);
connection = dataSource.getConnection();
statement = connection.prepareStatement( "INSERT INTO APP.TEST (
ID ) VALUES ( ? )" );
String ts = "2018-12-12-16.24.04.123456";
statement.setString(1, ts);
statement.addBatch();
statement.setString(1, ts);
statement.addBatch();
int[] b = statement.executeBatch();

The exception is:
Exception in thread "main" java.lang.ClassCastException:
com.ibm.db2.jcc.am.InternalTimestamp incompatible with
java.lang.String
at com.ibm.db2.jcc.t4.ah.a(ah.java:1526)
at com.ibm.db2.jcc.t4.ah.a(ah.java:1425)
Problem Summary:
****************************************************************
* USERS AFFECTED:                                              *
* 2                                                            *
****************************************************************
* PROBLEM DESCRIPTION:                                         *
* See Error Description                                        *
****************************************************************
* RECOMMENDATION:                                              *
* Upgrade to Vnext Jcc driver                                  *
****************************************************************
Local Fix:
Solution
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
01.03.2019
30.05.2019
30.05.2019
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)