Expand my Community achievements bar.

CIF OOB Integration causing Errors/Warnings in Junit Test Logs

Avatar

Level 1

Hi 

Below are the errors/warnings showing while I am running mvn clean test on project (core module).

WARN org.apache.sling.models.impl.AdapterImplementations - Unable to reflect on com.adobe.cq.commerce.core.components.internal.models.v1.contentfragment.CommerceContentFragmentImpl
java.lang.NoClassDefFoundError: Lcom/adobe/cq/cif/common/associatedcontent/AssociatedContentService;
    at java.base/java.lang.Class.getDeclaredFields0(Native Method)
    at java.base/java.lang.Class.privateGetDeclaredFields(Class.java:3062)
    at java.base/java.lang.Class.getDeclaredFields(Class.java:2249)

 

Unable to reflect on com.adobe.cq.commerce.core.components.internal.models.v1.list.CommerceListImpl
java.lang.NoClassDefFoundError: Lcom/adobe/cq/cif/common/associatedcontent/AssociatedContentService;
    at java.base/java.lang.Class.getDeclaredFields0(Native Method)

These errors come once the CIF core component dependency to the core module of the project with exiting Junit test classes.

POM - versions

core.wcm.components.version = 2.22.8
core.cif.components.version = 2.12.0
graphql.client.version = 1.7.10
magento.graphql.version = 9.1.0-magento242ee
aem.sdk.api = 2021.9.5899.20210929T093525Z-210800

AEM Service Pack 16.

Thanks 

2 Replies

Avatar

Employee

Hey Indrajit, Were you able to resolve this ? 

Avatar

Employee Advisor

Add this dependency in your core pom.xml to resolve this problem:

 

<dependency>
  <groupId>com.adobe.aem</groupId>
  <artifactId>aem-cif-sdk-api</artifactId>
  <version>2022.08.02.00</version>
  <scope>provided</scope>
</dependency>

 

I have validated this in my local, error is resolved after adding this.