1

//乔布斯.xml

<bean id="deptartmentReader" class="org.springframework.batch.item.file.FlatFileItemReader">        
       <property name="resource" value="file:C:\TO-DEV\dept.data" />    
       <property name="lineMapper" ref="deptLineMapper" />      
    </bean>

//tasklet.java

ConfigurableApplicationContext context = new ClassPathXmlApplicationContext("Jobs.xml");

当我从 unix 脚本运行此 java 文件时,出现以下错误

Caused by: java.lang.IllegalStateException: Input resource must exist (reader is in 'strict' mode): URL [file:C:\TO-DEV\OHM-Utils\dept.data]
        at org.springframework.batch.item.file.FlatFileItemReader.doOpen(FlatFileItemReader.java:250)
        at org.springframework.batch.item.support.AbstractItemCountingItemStreamItemReader.open(AbstractItemCountingItemStreamItemReader.java:134)
        ... 15 more

请对此提出建议...

4

0 回答 0