Upgrading a custom properties provider that implements ConfigurationPropertiesProvider to Java 17 is causing version compatibility issues.
ERROR :
2024-05-13 13:44:27,308 [WrapperListener_start_runner] [processor: ; event: ] org.mule.runtime.module.deployment.impl.internal.application.DefaultMuleApplication: Extension 'Vault Properties Loader' does not support Java 17. Supported versions are: [1.8, 11]
org.mule.runtime.module.extension.internal.manager.jdk.JavaVersionNotSupportedByExtensionException: Extension 'Vault Properties Loader' does not support Java 17. Supported versions are: [1.8, 11]
INFO 2024-05-13 13:44:27,321 [WrapperListener_start_runner] [processor: ; event: ] org.mule.runtime.module.deployment.impl.internal.artifact.AbstractDeployableArtifact: Application 'rtfx-zilla-m4-app' never started, nothing to dispose of
INFO 2024-05-13 13:44:27,464 [WrapperListener_start_runner] org.mule.runtime.core.internal.logging.LogUtil:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Failed to deploy artifact 'sample-m4-app', +
+ org.mule.runtime.deployment.model.api.DeploymentInitException: +
+ JavaVersionNotSupportedByExtensionException: Extension 'Vault Properties +
+ Loader' does not support Java 17. Supported versions are: [1.8, 11] +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ERROR 2024-05-13 13:44:27,464 [WrapperListener_start_runner] org.mule.runtime.module.deployment.internal.DefaultArchiveDeployer: Failed to deploy artifact [sample-m4-app]
org.mule.runtime.deployment.model.api.DeploymentException: Failed to deploy artifact [sample-m4-app]
Caused by: org.mule.runtime.api.exception.MuleRuntimeException: org.mule.runtime.deployment.model.api.DeploymentInitException: JavaVersionNotSupportedByExtensionException: Extension 'Vault Properties Loader' does not support Java 17. Supported versions are: [1.8, 11]
Caused by: org.mule.runtime.deployment.model.api.DeploymentInitException: JavaVersionNotSupportedByExtensionException: Extension 'Vault Properties Loader' does not support Java 17. Supported versions are: [1.8, 11]
Caused by: org.mule.runtime.core.api.config.ConfigurationException: Extension 'Vault Properties Loader' does not support Java 17. Supported versions are: [1.8, 11]
Caused by: org.mule.runtime.module.extension.internal.manager.jdk.JavaVersionNotSupportedByExtensionException: Extension 'Vault Properties Loader' does not support Java 17. Supported versions are: [1.8, 11]
CAUSE:
The ConfigurationPropertiesProvider extension is not a Java SDK extension like mentioned in the https://docs.mulesoft.com/general/customer-connector-upgrade. which is why it doesn't use the @Extension annotation. Instead, this extension follows what is sometimes referred to as a "crafted extension" mechanism.
To specify the supported Java versions you'll need to use the ExtensionDeclarer#supportingJavaVersions.
In the class VaultConfigurationPropertiesExtensionLoadingDelegate.java, inside the accept method:
@Override
public void accept(ExtensionDeclarer extensionDeclarer, ExtensionLoadingContext context) {
Declare the Java versions as follows:
Set<String> javaVersions = new HashSet<String>();
javaVersions.add(JavaVersion.JAVA_8.version());
javaVersions.add(JavaVersion.JAVA_11.version());
javaVersions.add(JavaVersion.JAVA_17.version());
extensionDeclarer.supportingJavaVersions(javaVersions);
This API will tell Mule that the extension supports Java 17.
https://docs.mulesoft.com/general/customer-connector-upgrade
001920437

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.