Solved
AEMaaCS AEM SDK2025.3.20133.20250325T063357Z-250300 jar fails with gson
I have just upgraded our build to use the latest AEM SDK, however everything that uses JSON now fails to run with the following errors
java.lang.NoSuchMethodError: 'void com.google.gson.internal.ConstructorConstructor.<init>(java.util.Map, boolean)'
at com.google.gson.Gson.<init>(Gson.java:218)
at com.google.gson.Gson.<init>(Gson.java:195)
at com.merkle.xp.whitelabel.core.models.MerklePageImpl.getSeoSiteStructuredData(MerklePageImpl.java:310)
at com.merkle.xp.whitelabel.core.models.MerklePageImplTest.testSeoSiteWithNoSeoData(MerklePageImplTest.java:436)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
The code that does this is new Gson()
I can revert back to an older version, however I worry how this will work on the servers.