AVIO Consulting

Goodbye JDK 8, Hello JDK 17: What MuleSoft Developers Should Know Before Upgrading

Jul 16, 2025 | General

As organizations look to stay aligned with MuleSoft’s latest platform updates, migrating to Java 17 has become not just recommended, but required. In this post, we share what we’ve learned after migrating well over one hundred APIs to Java 17, including connector pitfalls, real-world fixes, and how to make your transition smoother and faster.


Why JDK 17?

With the release of Mule Runtime 4.6 (February 2024), MuleSoft officially adopted Java 17 (JDK 17)—a significant step up from the previously used JDK 8 LTS version. Starting with Mule 4.9 (February 2025) and later, Java 17 has become the mandatory runtime for production deployments.

Why this matters to you:

  • Long-Term Support (LTS): Java 17 is the only Java version supported in the latest MuleSoft LTS releases (4.9+), ensuring ongoing updates, security patches, and extended maintenance; support timelines for older Java versions (8 & 11) are ending soon—March 2025 for some “Edge” runtimes, and February 2026 for Mule 4.6 LTS
  • Performance & Efficiency: Thanks to advancements like the new JIT compiler, improved garbage collection, and better TLS cipher handling, Java 17 delivers faster performance and more consistent response times—key for mission-critical integrations
  • Security Enhancements: Upgrading to Java 17 gives you built-in protection against the latest vulnerabilities, bolstered encryption, and compliance with modern security standards
  • Modern Development Features: By using the Java SDK with Java 17, your custom connectors and modules can unlock features like pattern matching, sealed classes, and stronger encapsulation

What This Means for Connectors

Migrating to JDK 17 isn’t just about upgrading the runtime—it also means taking a close look at the connectors your applications rely on. Many MuleSoft connectors were originally built and tested against JDK 8, and some of them may not behave as expected when running under JDK 17 unless they’re updated to a compatible version.

MuleSoft provides an official compatibility matrix that outlines the minimum supported version for each connector when running on Java 17. While upgrading to the minimum required version may be enough to get things working, we strongly recommend going a step further and updating to at least the latest available version within the same major version.

Upgrading connectors to newer versions ensures:

  • JDK 17 compatibility with necessary internal library and classloader changes
  • Performance and stability improvements based on the latest MuleSoft engineering updates
  • Security patches for any known vulnerabilities in previous connector versions
  • Access to new features and enhancements released over the past several versions

In our experience, updating connectors to Java 17-compatible versions is often straightforward, but not always. Some require extra attention due to breaking changes introduced in major version upgrades, updated dependencies, or subtle behavioral differences that emerge when running under Java 17. These behavioral differences are typically the result of changes in the Java Virtual Machine (JVM) itself, not issues with the connectors or MuleSoft.

That’s why it’s important to:

  • Audit every connector in use across your APIs and integrations
  • Cross-reference them with the MuleSoft compatibility matrix
  • Test extensively before promoting changes to production

Watch Out for Custom Connectors

While MuleSoft’s official connectors have documented upgrade paths and version support for Java 17, custom-built connectors—whether developed in-house or sourced from community projects—require closer attention.

MuleSoft provides guidance for upgrading custom connectors, including a checklist for reviewing and updating Java and XML SDK connectors to be JDK 17 compatible. If you’re using any connector not directly maintained by MuleSoft, we strongly recommend reviewing that documentation as a starting point.

On a similar note, REST Connect connectors need to be republished to Exchange to force them to be JDK 17 compatible.

Even if a connector builds and deploys successfully, it may not behave consistently under Java 17. Treating these components as first-class migration artifacts—just like your flows and APIs—can help ensure long-term stability.

One common example of a widely adopted community connector is the JSON Logger module from MuleSoft Consulting. While it’s been a popular tool for structured logging in Mule applications, it hasn’t been updated for Java 17 and is no longer officially supported. If you’re using this module, we recommend replacing it with a supported alternative such as the AVIO Custom Logger, which is designed to be compatible with modern Mule runtimes and is Java 17 compliant.

Known Issues We Encountered (Real-World Examples)

During our recent migration projects, we worked closely with a variety of teams to move their MuleSoft applications from JDK 8 to JDK 17. While many components upgraded smoothly, we did encounter a few connector-specific issues that required investigation and careful remediation.

Here are some real-world examples of what we ran into—and how we solved it:

Snowflake JDBC Connector

After migrating to a JDK 17 compatible version of the connector, you might encounter one of the following runtime errors (depending on the exact version of the connector):

Exception creating result java.lang.ExceptionInInitializerError: null at net.snowflake.client.jdbc.internal.apache.arrow.memory.unsafe.UnsafeAllocationManager.<clinit>(UnsafeAllocationManager.java:28)
Connectivity test failed for config 'Database_Config'. Application deployment will continue. Error was: Could not obtain connection from data source org.mule.runtime.api.connection.ConnectionException: Could not obtain connection from data source Caused by: org.mule.db.commons.shaded.api.exception.connection.ConnectionCreationException: Could not obtain connection from data source Caused by: org.mule.runtime.extension.api.exception.ModuleException: java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.io.File.exists()" because "this.cacheFile" is null

This issue stems from strong encapsulation, a change introduced in JDK 16 and enforced by default in JDK 17. It restricts reflective access to non-public Java classes and internal packages. While the problem doesn’t originate in the Snowflake connector itself, it affects one of its underlying dependencies. This dependency attempts to use reflection in a way that’s no longer permitted, causing the connector to break under JDK 17.

As a workaround, we’ve found that adding the following query parameter to the JDBC connection URL allows the Snowflake connector to function correctly under JDK 17:

&JDBC_QUERY_RESULT_FORMAT=JSON

This forces the connector to use a supported result format that avoids the reflective access issue triggered by the default behavior.

SFTP Connector

In newer versions of the SFTP Connector (required for Java 17 compatibility), two key changes were introduced:

  1. The default baseDir is no longer implicitly set. If not explicitly configured, the connector assumes an empty string, which may cause path resolution failures. Previously, it defaulted to /, which worked for most use cases. The solution is to explicitly set baseDir="/" in the SFTP configuration to preserve previous behavior.
  2. The structure of the list operation’s response has changed — it no longer fetches the file content. Instead, each item in the returned list now contains only the full path to the files. This change breaks any downstream logic that relied on the previous structure. The required fix depends on how the response is used:
    • If your flow needs file content, you’ll now need to iterate over the returned paths and explicitly download each file using a separate read operation
    • If your use case never required file content, updating the DataWeave expression or flow logic to handle the new format will typically resolve the issue

This is a good example of how version-specific connector (behavior) changes—while not directly tied to Java 17—can surface during a migration process.

SQL Server Connector

After upgrading to Java 17 and updating to a compatible version of the Database Connector, we encountered TLS handshake failures when connecting to SQL Server instances using self-signed certificates. These environments previously worked under JDK 8 without any additional configuration.

Starting with version 10.2 of the Microsoft JDBC Driver, a breaking change was introduced:
When encrypt=false is set but the server requires encryption, the driver now validates the server certificate based on the trustServerCertificate setting. Previously, this was more lenient, but with the updated behavior, connections will fail.

Solution: trustServerCertificate=true needs to be explicitly specified in the JDBC URL or connection configuration (depending on whether we’re using a generic-connection or a mssql-connection).

This is another clear example of how version-specific changes, especially in third-party drivers or dependencies, can introduce unexpected issues during a migration.

Ready to Migrate?

Here’s What We’ve Learned—and How We Can Help

Migrating to Java 17 is an opportunity to modernize, strengthen, and future-proof your integration landscape. But as we’ve seen, the path isn’t always straightforward. Connector versions, JDBC drivers, and custom modules migration could lead to unexpected work and challenges.

At AVIO Consulting, we specialize in helping organizations navigate complex MuleSoft platform upgrades. We’ve led well over 100 API migrations involving CloudHub 2.0, Mule 4.6+, and Java 17, and we know exactly what to expect—from connector quirks to platform-level gotchas. More importantly, we know how to solve them fast and with minimal disruption to your business. Partnering with a team that’s done it before can dramatically reduce risk, accelerate timelines, and deliver a smoother overall experience.

If you’re considering a migration—or already in the thick of it—we’d love to help.