I'm trying to set up a batch job using JdbcPagingItemReader connected to DB2. The sort key column I configure is of type TIMESTAMP. The initial pagesize worth of rows is fed into my ItemProcessor normally, but when the second page fetch is attempted, I get this error:
I suspect it has to do with the TIMESTAMP column type. Specifically, I think the parameter being substituted by springbatch in the "TS > ?" part of the where clause is the problem, but I'm only guessing.
SEVERE: Encountered an error executing the step: class org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT client_number, sub_type, ts, xml_record FROM bgadmin.event WHERE DATE(TS) = current date - 56 day AND TYPE IN ('Page','BusinessService') AND SYSTEM = 'EBPP' AND TS > ? ORDER BY TS ASC FETCH FIRST 10 ROWS ONLY]; SQL state [null]; error code [-99999]; [ibm][db2][jcc] Illegal conversion.; nested exception is com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc] Illegal conversion.