Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

AEMaaCS AEM SDK2025.3.20133.20250325T063357Z-250300 jar fails with gson

Avatar

Level 3

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.

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 1

Got the same issue earlier, I am assuming you are using GSON version 2.8.9 or older in your code. 

Update the version to [2.9.0] and test your code that uses GSON library. Everything should get fixed after this.

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @taggatmerkle ,

 

I would assume that you include com.google.code.gson dependency with newer version in your pom.xml.

 

Please check through the Package Dependencies (/system/console/depfinder) latest version that is provided within AEM SDK API dependency. If you bundle is importing another version, please update dependency version to one that is provided with AEM SDK API. 

 

Also double check deprecated API: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/release-notes/de... 

 

Best regards,

Kostiantyn Diachenko.

Kostiantyn Diachenko


Check out AEM VLT Intellij plugin


Yes we did, but it seems to get ignored since the SDK has a version of gson in it.

 

To get around this i have removed GSON from all of our code and used ObjectMapper instead.

Avatar

Correct answer by
Level 1

Got the same issue earlier, I am assuming you are using GSON version 2.8.9 or older in your code. 

Update the version to [2.9.0] and test your code that uses GSON library. Everything should get fixed after this.

Avatar

Administrator

@taggatmerkle Did you find the suggestions helpful? If you need more information, please let us know. If a response resolved your issue, kindly mark it as correct to help others in the future. Alternatively, if you discovered a solution on your own, we'd appreciate it if you could share it with the community. Thank you!



Kautuk Sahni

Avatar

Level 3

Yes the reply by sharma_g resolved the issue and everything is working as expected (thought i had marked it as correct but can't see that now)