From 70b796e346d25a417710a83fbe5e4d1043843526 Mon Sep 17 00:00:00 2001 From: udir Date: Mon, 13 Apr 2026 15:45:33 +0300 Subject: [PATCH] Fix Jackson 2.21 compatibility: PropertyNamingStrategy.UPPER_CAMEL_CASE removed Jackson 2.21 (bundled with Spring Boot 3.5.x) removed the deprecated static field PropertyNamingStrategy.UPPER_CAMEL_CASE, causing a fatal NoSuchFieldError at runtime when NomadJson class initializes. Migrate to PropertyNamingStrategies.UPPER_CAMEL_CASE (available since Jackson 2.12) and update the compile-time Jackson version to 2.18.2. This fixes PIM-7078 where slave server initialization crashes with: Exception in thread "Setup" java.lang.NoSuchFieldError: Class com.fasterxml.jackson.databind.PropertyNamingStrategy does not have member field UPPER_CAMEL_CASE Made-with: Cursor --- pom.xml | 2 +- sdk/src/main/java/com/hashicorp/nomad/javasdk/NomadJson.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 01c5ca7..e36a8e6 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ testkit - 2.10.3 + 2.18.2 1.8 UTF-8 diff --git a/sdk/src/main/java/com/hashicorp/nomad/javasdk/NomadJson.java b/sdk/src/main/java/com/hashicorp/nomad/javasdk/NomadJson.java index 108611a..c2779c1 100644 --- a/sdk/src/main/java/com/hashicorp/nomad/javasdk/NomadJson.java +++ b/sdk/src/main/java/com/hashicorp/nomad/javasdk/NomadJson.java @@ -16,7 +16,7 @@ import java.util.Date; import java.util.List; -import static com.fasterxml.jackson.databind.PropertyNamingStrategy.UPPER_CAMEL_CASE; +import static com.fasterxml.jackson.databind.PropertyNamingStrategies.UPPER_CAMEL_CASE; /** * Serialises Nomad API model types to JSON, and vice versa.