PLEASE ignore this question.
The table uses a trigger to populate the ID field and in our QA environment, the Trigger was not attached, resulting in the below error.
Aside: Is there a way for me to delete the post?
Thanks
Hi,
I get this error frequently and am not able to reproduce as if I restart the job, it works fine. I am using 2.1.9.RELEASE' version.
Thanks
The pagingItemreader is defined as follows:Code:org.springframework.dao.InvalidDataAccessApiUsageException: No value supplied for the SQL parameter '_sortKey': No value registered for key '_sortKey' at org.springframework.jdbc.core.namedparam.NamedParameterUtils.buildValueArray(NamedParameterUtils.java:331) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.getPreparedStatementCreator(NamedParameterJdbcTemplate.java:316) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:166) at org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate.query(NamedParameterJdbcTemplate.java:172) at org.springframework.batch.item.database.JdbcPagingItemReader.doReadPage(JdbcPagingItemReader.java:217)
where the table structure:Code:<bean id="jdbcPagingReader" abstract="true" class="org.springframework.batch.item.database.JdbcPagingItemReader"> <property name="dataSource" ref="dataSource" /> <property name="rowMapper"> <bean class="com.pcg.interfaces.ach.batch.dao.support.AchRowMapper" /> </property> <property name="queryProvider"> <bean class="org.springframework.batch.item.database.support.SqlPagingQueryProviderFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="sortKey" value="ID" /> <property name="selectClause" value="select ID, TYPE, EVENT" /> <property name="fromClause" value="FROM ACH" /> <property name="whereClause" value="WHERE TYPE = :type and INTERFACE_TYPE=:interfaceType" /> </bean> </property> <property name="pageSize" value="300" /> </bean>
Code:ACH ( ID INTEGER, TYPE VARCHAR2(100 BYTE), EVENT CLOB, ADDED_TS DATE, STATUS VARCHAR2(1 BYTE), INTERFACE_TYPE VARCHAR2(3 BYTE), ACCOUNT INTEGER )


Reply With Quote