Skip to main content
Level 2
Feb 21, 2023 12:51 PM UTC

AEM 6.5 GSON version upgrade from 2.8.2 to 2.10.1

Hi Team,

Please help me with the below issue.

After upgrading GSON maven version from 2.8.2 to 2.10.1, I can successfully create a gson object in a normal java class.But Junit test cases are failing due to java.lang.NoClassDefFoundError.

 

Below is my pom.xml

<dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.10.1</version>
                <scope>provided</scope>
            </dependency>

 Thanks in advance

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Jagadeesh_Prakash
Community Advisor
Community Advisor
Feb 21, 2023 2:20 PM UTC

@ashwiniv5325199  Once try deleting the old corresponding dependency file in .m2 folder and try building it once again

Translate
BrianKasingli
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Feb 21, 2023 10:35 PM UTC

You can try to take a look at the Uber Jar, and use that version instead.

Translate
Manu_Mathew_
Community Advisor
Community Advisor
Feb 22, 2023 3:59 AM UTC

@ashwiniv5325199 You can try deleting the respective target folders and re-build your test module, as it might not be able to find the class at runtime.

Translate
Level 2
Jul 26, 2023 2:07 PM UTC

@ashwiniv5325199 

Hi,

Did you get any solution?

Translate