Hallo,
I have a batch job with this reader :
The first chunk of 20 item all works, but the second page fail with the error :Code:<bean id="collectionEntryReader" class="org.springframework.batch.item.database.JdbcPagingItemReader" scope="step"> <property name="dataSource" ref="myDataSource" /> <property name="queryProvider"> <bean class="org.springframework.batch.item.database.support.SqlPagingQueryProviderFactoryBean"> <property name="dataSource" ref="myDataSource" /> <property name="databaseType" value="DB2" /> <property name="selectClause" value="SELECT colid, status, foo, bar, guu" /> <property name="fromClause" value="FROM ${my_schema}.MYTABLE" /> <property name="whereClause" value="WHERE status IN ('17','38') AND XMLCAST( XMLQUERY(... ) <=(select current date from sysibm.sysdummy1)" /> <property name="sortKey" value="colid" /> </bean> </property> <property name="pageSize" value="20" /> <property name="rowMapper" ref="myMapper" /> </bean>
It look like placeholder in the query is not substituted.Code:... ate from sysibm.sysdummy1) AND colid > ? ORDER BY colid ASC FETCH FIRST 20 ROWS ONLY]; nested exception is java.sql.SQLException: [EXECUTE] Wrong nbr of host variables
What i m missing here ?


Reply With Quote