Tasks built with Java 21 run on Java 17 when adaptive mode is enabled on Talend Remote Engine
When a Talend Remote Engine with adaptive mode enabled inherits Java 17 as its startup Java version, such as from installation, upgrade, or you custom configuration, tasks built with Java 21 may be executed on Java 17 instead of Java 21, even though Java 17 may not appear in the adaptive mode configuration.
This is an edge case that occurs under specific installation, upgrade, or custom configuration scenarios. This topic explains the symptom, cause, and resolution steps.
Symptom
Your Talend Remote Engine is configured with adaptive mode enabled to dynamically select Java versions for task execution. However, when you deploy and run a task built with Java 21 compliance level, the task executes on Java 17 instead of Java 21. This occurs even though:
- Java 21 is configured and available in the adaptive mode configuration file (<RE_installation>/etc/system.properties).
- Java 17 does not appear in the adaptive mode configuration, or appears with a comment marker.
This behavior affects:
- Data Integration Jobs built with Java 21 compliance level
- Microservices (Data Services and Routes) built with Java 21 compliance level
Cause
When adaptive mode is enabled, the engine uses the startup Java version (Java 17 in this case) as a fallback for any configured Java version that is not explicitly defined in the system.properties file.
However, when the default startup Java version has been set to Java 17, this fallback behavior may inadvertently keep taking precedence over Java 21, causing Java 21 artifacts to run on Java 17.