Deployment fails with: Invalid Flink cluster version: (expected: X.Y)

Issue

Your deployment on Ververica Platform fails with the error message Invalid Flink cluster version: (expected: X.Y) Where X.Y is a specific Flink version such as 1.10.

Environment

  • Ververica Platform 2.0 or later.

Cause

Your user code contains classes from the Flink runtime and you are experiencing classpath errors where the incorrect class is being loaded into the job's classloader.

You can verify that there are runtime classes in your packaged code by running the following commands.

jar tf user-code.jar | grep org/apache/flink/runtime/

Resolution

Ensure that you are not packaging any Flink runtime classes in your artifact by marking all core Flink dependencies such as flink-java and flink-streaming-java as provided in your build. See how to package my jar for deployment for more information.