-
Oct 25th, 2010, 03:30 PM
#1
Bug in AsyncItemProcessor. Can not use scope step. Scope 'step' is not active except.
Hi,
I am trying to use "org.springframework.batch.integration.async.Async ItemProcessor" to make Processor multithreading. I am passing as a "delegate" my own service/bean.
If I declare that bean in scope "step". I get the following exception (below):
I am attaching job description xml and the my service/bean that acts as a "delegate"
Thanks,
Tanya.
org.springframework.batch.retry.ExhaustedRetryExce ption: Retry exhausted after last attempt in recovery path, but exception is not skippable.; nested exception is java.util.concurrent.ExecutionException: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'scopedTarget.marcLocalCSIProcessor': Scope 'step' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No context holder available for step scope
at org.springframework.batch.core.step.item.FaultTole rantChunkProcessor$5.recover(FaultTolerantChunkPro cessor.java:380)
at org.springframework.batch.retry.support.RetryTempl ate.handleRetryExhausted(RetryTemplate.java:414)
at org.springframework.batch.retry.support.RetryTempl ate.doExecute(RetryTemplate.java:283)
at org.springframework.batch.retry.support.RetryTempl ate.execute(RetryTemplate.java:187)
at org.springframework.batch.core.step.item.BatchRetr yTemplate.execute(BatchRetryTemplate.java:213)
at org.springframework.batch.core.step.item.FaultTole rantChunkProcessor.write(FaultTolerantChunkProcess or.java:393)
at org.springframework.batch.core.step.item.SimpleChu nkProcessor.process(SimpleChunkProcessor.java:194)
at org.springframework.batch.core.step.item.ChunkOrie ntedTasklet.execute(ChunkOrientedTasklet.java:74)
at org.springframework.batch.core.step.tasklet.Taskle tStep$ChunkTransactionCallback.doInTransaction(Tas kletStep.java:358)
at org.springframework.transaction.support.Transactio nTemplate.execute(TransactionTemplate.java:130)
at org.springframework.batch.core.step.tasklet.Taskle tStep$2.doInChunkContext(TaskletStep.java:261)
at org.springframework.batch.core.scope.context.StepC ontextRepeatCallback.doInIteration(StepContextRepe atCallback.java:76)
at org.springframework.batch.repeat.support.RepeatTem plate.getNextResult(RepeatTemplate.java:367)
at org.springframework.batch.repeat.support.RepeatTem plate.executeInternal(RepeatTemplate.java:214)
at org.springframework.batch.repeat.support.RepeatTem plate.iterate(RepeatTemplate.java:143)
at org.springframework.batch.core.step.tasklet.Taskle tStep.doExecute(TaskletStep.java:247)
at org.springframework.batch.core.step.AbstractStep.e xecute(AbstractStep.java:196)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethod
-
Oct 30th, 2010, 10:33 AM
#2
Not sure I would call that a bug (missing feature maybe), but you are right that we could take care of it in the framework. You could raise a JIRA issue.
-
Nov 3rd, 2010, 09:27 AM
#3
Can not find code changes for BATCHADM-81 JIRA
Dave,
I can not find source code changes for the BATCHADM-81 JIRA. could you, please, send the URL for the source code?
Thank you,
Tanya.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules