2015-08-19 34 views
1

我們使用以下配置來輪詢db表以選擇行,只要這些行被選中,我們想將其狀態更新爲其他內容,因此它不會在下次調查中再次提起。這裏是配置其上更新查詢失敗與致錯誤消息彈簧集成jdbc入站輪詢器無法通過無效列類型進行更新查詢

:java.sql.SQLException中:無效的列類型

<int-jdbc:inbound-channel-adapter 
    auto-startup="true" channel="pollingChannel" 
    query="$select id,status from test_table where status='ready'" 
    data-source="dataSource" 
    id="pollingChannelAdapter" 
    row-mapper="testRowMapper" 
    update="update test_table set status='picked' where id in (:id)" 
    update-per-row="true" 
    > 

    <int:poller default="false" id="poller" max-messages-per-poll="1" fixed-rate="1000"/> 
</int-jdbc:inbound-channel-adapter> 

回答

2
實測值

修復。我必須使用在value對象中定義的適當屬性,因爲我正在使用行映射器將選擇查詢響應解析爲某個沒有名爲「id」的屬性的值對象。一旦我改變了一個,它開始工作正常。

+0

你可以接受你自己的答案:-) –