apache/dolphinscheduler · error · TaskException
java task params is not valid
Error message
java task params is not valid
What it means
A parameter validation guard in JavaTask.init: javaParameters is null after parsing taskParams (invalid JSON) or checkParameters() failed because required fields (e.g. mainClass or run type-related fields) are missing. The offending input is the task definition's parameter JSON; the task fails at init before command construction.
Source
Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/JavaTask.java:71
private final ShellCommandExecutor shellCommandExecutor;
public JavaTask(TaskExecutionContext taskRequest) {
super(taskRequest);
this.taskRequest = taskRequest;
this.shellCommandExecutor = new ShellCommandExecutor(taskRequest);
}
/**
* Initializes a Java task
*
* @return void
**/
@Override
public void init() {
javaParameters = JSONUtils.parseObject(taskRequest.getTaskParams(), JavaParameters.class);
if (javaParameters == null || !javaParameters.checkParameters()) {
throw new TaskException("java task params is not valid");
}
log.info("Initialize java task params {}", JSONUtils.toPrettyJsonString(javaParameters));
}
/**
* Execute Java tasks
*
* @return void
* @throws Exception
*/
@Override
public void handle(TaskCallBack taskCallBack) throws TaskException {
try {
// Step 1: judge if is java or jar run type.
// Step 2 case1: the fat jar run type builds the command directly, adding resource to the java -jar class
// when
// building the command
// Step 2 case2: the normal jar run type builds the command directly, adding resource to the java -cp classView on GitHub (pinned to 02eac45a1b)
Solutions
- Complete the required Java task fields (mainClass, jvm args, run type, resources)
- Ensure taskParams JSON deserializes into JavaParameters — check field names and types
- Validate on save in the UI to catch missing fields early
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at dolphinscheduler-task-plugin/dolphinscheduler-task-java/src/main/java/org/apache/dolphinscheduler/plugin/task/java/JavaTask.java:71 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/dolphinscheduler@02eac45a1b (2026-09-06).
Data as JSON: /api/errors/8d8223b9a6476e1a.
Report an issue: GitHub.