spring-cloud-dataflow icon indicating copy to clipboard operation
spring-cloud-dataflow copied to clipboard

A job execution id is required error throws

Open nvengatesan opened this issue 1 year ago • 3 comments
trafficstars

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.

nvengatesan avatar Dec 12 '23 21:12 nvengatesan

Could you anyone pls respond? Thanks in advance.

image

nvengatesan avatar Dec 14 '23 10:12 nvengatesan

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?

cppwfs avatar Dec 14 '23 18:12 cppwfs

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

corneil avatar Jan 04 '24 10:01 corneil

Closing due to inactivity. If closed in error please let us know.

cppwfs avatar Jul 22 '24 14:07 cppwfs