<-- Back

How to resolve Java version conflict when building Mendix 10 packages in the Mendix Cloud

Introduction

This article describes an issue where building Mendix 10 packages in the Mendix Cloud fails due to a Java version conflict, and provides a solution to resolve it.

Details

When attempting to build a deployment package for a Mendix 10 project in the Mendix Cloud, the build process fails with an error indicating that Java release version 21 is not supported, despite the project being configured to use Java 21. The build logs mention the line below (before running MxBuild):

[compile] {datetime} Using Java 11

The build logs fail with the error below:

[compile] {datetime} * What went wrong:
[compile] {datetime} Execution failed for task ':compile'.
[compile] {datetime} error: release version 21 not supported

Environment

  • Mendix 10 and newer
  • Applications hosted in Mendix Cloud

Cause

The issue is caused by the presence of a java-version file in the root of the project, with the content 11. This file overrides the Java version setting in the project, causing a conflict with the required Java 21 version for Mendix 10 projects.

Solution/Workaround

To resolve this issue, follow these steps:

  1. Locate the java-version file in the root directory of your Mendix project.
  2. Delete the java-version file.
  3. Commit and push the changes to your version control system.
  4. Attempt to build the deployment package again in the Mendix Cloud.

After removing the "java-version" file, the build process should successfully use Java 21 as configured in the project settings.

Internal information related

  • #261332
  • DEPS-740

Additional information

Not applicable.

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.