spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
A job execution id is required error throws
Description: A job execution id is required error is thrown in the partition when using deployer partition handler.
Code:
final List<String> commandLineArgs = new ArrayList<>(3); commandLineArgs.add("-spring.profiles.active=worker"); commandLineArgs.add("-spring.cloud.task.initialize.enable=false"); commandLineArgs.add("-spring.batch.initializer.enabled=false"); commandLineArgs.add("-spring.datasource.initialize=false");
partitionHandler.setCommandLineArgsProvider(new PassThroughCommandLineArgsProvider(commandLineArgs));
SimpleEnvironmentVariablesProvider simpleEnvironmentVariablesProvider = new
SimpleEnvironmentVariablesProvider(this.environment);
partitionHandler.setEnvironmentVariablesProvider(simpleEnvironmentVariablesProvider);
partitionHandler.setMaxWorkers(this.properties.getMaxWorkerSize());
partitionHandler.setGridSize(this.properties.getGridSize());
partitionHandler.setApplicationName(this.properties.getWorkerStep().getApplicationName());
Exception:
Caused by: java.lang.IllegalArgumentException: A job execution id is required at org.springframework.util.Assert.isTrue(Assert.java:121) at org.springframework.cloud.task.batch.partition.DeployerStepExecutionHandler.validateRequest(DeployerStepExecutionHandler.java:127)
Versions that I am using
Java version : 11 SCDF : 2.11.0 Spring boot : 2.7.13 Spring batch: 4
When I ran the same code in SCDF 2.6, I don't see any issue, it was creating the partitions. Is there any recommended version for SCDF 2.11? I mean java, batch versions.
Could you anyone pls respond? Thanks in advance.
I ran the sample from Spring Cloud Task Partitioning sample and was unable to reproduce your issue.
Verify that you are setting use-spring-application-json to true.
Can you provide a sample app that reproduces the issue?
You should build SCDF with Java 8. You can use higher versions at runtime. Spring Cloud Data Flow uses Batch 4 API internally but has a lot of code to deal with Batch 5 tables and supports deploying applications based on Boot 3.x
Closing due to inactivity. If closed in error please let us know.