2014-12-06 65 views
0

在我的工作中,我將數據庫導出爲分區的csv。下一步使用MultiResourceItemReader將這些文件合併到一個文件中。如何確保在進入下一個作業步驟之前完成所有步驟分區

我的問題是,合併步驟開始時,文件似乎不可用。 我得到這個異常的作業失敗的所有部分的CSV文件中導出目錄可用

java.lang.IllegalStateException: No resources to read. Set strict=false if this is not an error condition. 
    at org.springframework.batch.item.file.MultiResourceItemReader.open(MultiResourceItemReader.java:169) 
    at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96) 
    at org.springframework.batch.core.step.item.ChunkMonitor.open(ChunkMonitor.java:114) 
    at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96) 
    at org.springframework.batch.core.step.tasklet.TaskletStep.open(TaskletStep.java:310) 
    at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) 
    at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148) 
    at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64) 

但隨後後。 在春季批處理參考中,它實際上列出了第16頁上的這種非常體系結構的考慮事項:

此外,體系結構還應考慮分區的整合。關鍵問題 包括: •在進入下一個工作步驟之前,是否必須完成所有分區?

我已經搜索了文檔和網頁,以瞭解如何確保在進入下一個作業步驟之前完成所有步驟分區並且似乎找不到答案的答案。

雖然這一定是一個普遍的考慮因素,但顯然我錯過了一些很大的東西。

回答

0

默認情況下,只有分區的所有步驟完成後,步驟纔會被標記爲完成。你確定你下一步正在尋找正確的目錄中的文件?

您可以開啓日誌記錄,它應提供有關何時完成步驟和下一步開始的詳細信息