Application images built using the Gradle JIB plugin is randomly returning Jackson runtime errors

I have been facing strange runtime issues with the Jackson core libraries. The application randomly reports the below issue.

java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.getReadCapabilities()Lcom/fasterxml/jackson/core/util/JacksonFeatureSet;

The Jackson core version used in the dependencies is 2.9.5 however, I have noticed during the build process that the JIB plugin probably bringing in its own Jackson core version 2.13.1 from its transitive dependencies.

I attempted several changes to get around the issue by upgrading the version of jackson dependencies to 2.12.7 however, the runtime issue in my application kept returning. I have now implemented the following changes but still not sure if it has addressed the issue for good.

  1. Clearing the Gradle cache every time the build runs on the GitLab runner (this did not make any difference as the run time issue was still there)
  2. Rolled back Jackson dependencies to version 2.9.5.

I have run the dependency check several times to confirm if any transitive dependencies are bringing their own Jackson Core versions and I can’t see any. Any help would be much appreciated.