-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
partitioned-batch-job raises org.springframework.cloud.task.listener.TaskExecutionException when Partitioner is @StepScope #792
Comments
Thought to paste here from #793 #793 (comment), as this is the approach my workaround + my own code tested without issue (and actually more relate to this issue rather than #793) My hypothesis on the issue can be found in For me the manually pass stepName as normal String object has issue (maybe the bean is already pre-loaded at that point). The only way I am able to get it work is through I ended up with only 1 partitionerhandler + 1 splitter and utilize This also answer your first question about how to pass in step dynamically (sort of) by I am using stepExecutionContext -> find out the trigger step name (from your example, one step is You can see the full config in PartitionerHandler (note it utilize
Partitioner (note it utilize
Worker steps define, notice there are three steps
Job setup
Below can be in job parameters (so then can configure to use pass in, I just used job execution)
Full class implementation
|
Hello,
I modified the partitioned-batch-job sample such that the PartitonHandler class reads as follows:
And I also modified the method partitonJob as follows:
This is in order to use multiple steps and, hence, to be able to pass the step name as an input argument of the partitinHandler() method.
Running the job raises the following exception:
I have found many similar cases on stackoverflow but no working solutions. Please advise.
Many thanks in advance.
The text was updated successfully, but these errors were encountered: