读取期间不可跳过的执行-使用SpringXD的Spring Batch作业

时间:2018-12-17 19:28:52

标签: spring spring-batch spring-xd spring-batch-job-monitoring

我正在尝试使用spring xd shell启动SpringXD作业,而我一直在使用的代码是

job create 
--name  
--definition ' 
--ftpFileLoadFlag=false 
--archiveFolder=
--columns= 
--delimiter="\t" 
--encoding=UTF-8 
--filePathPattern= 
--linesToSkip=1 
--maxItemCount=2147483647 
--cdcMode=false 
--grid= 
--grid_password="" 
--grid_username=
--keys="*" 
--locators=
--namingServer=
--path=
--skipColumns="" 
--temporal=false 
--commitInterval=10000 
--corePoolSize=20 
--maxPoolSize=20 
--throttleLimit=8 
--dateFormat=yyyy-MM-dd 
--makeUnique=true 
--reportLocation=
--reportFlg=false 
--randomSize=20 
--cleanData=false
--writeGrid=true 
--writeParquet=false 
--s3Region= 
--writeS3=false  
--awsAccessKeyId=
--awsSecretAccessKey=
--deltaLoad=false 
--envName=
--resourcePath=
--notParseColumn=
--quote="""' 
--deploy

每次我尝试启动此作业时,都会在本地SpringXD UI中收到类似这样的错误。

org.springframework.batch.core.step.skip.NonSkippableReadException: Non-skippable exception during read
   at org.springframework.batch.core.step.item.FaultTolerantChunkProvider.read(FaultTolerantChunkProvider.java:105)
   at org.springframework.batch.core.step.item.SimpleChunkProvider$1.doInIteration(SimpleChunkProvider.java:116)
   at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
   at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
   at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
   at org.springframework.batch.core.step.item.SimpleChunkProvider.provide(SimpleChunkProvider.java:110)
   at org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:69)
   at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:406)
   at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)
   at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)
   at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)
   at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)
   at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)
   at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)
   at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)
   at org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler$1.call(TaskExecutorPartitionHandler.java:139)
   at org.springframework.batch.core.partition.support.TaskExecutorPartitionHandler$1.call(TaskExecutorPartitionHandler.java:136)
   at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.batch.item.file.FlatFileParseException: Parsing error at line: 1 in res

让我知道有关如何克服该异常的宝贵建议或解决方案。

提前谢谢

0 个答案:

没有答案