Skip to main content
New Participant
Sep 21, 2023 10:11 AM UTC
Question

CIF OOB Integration causing Errors/Warnings in Junit Test Logs

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 

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

2 replies

Employee
Apr 11, 2024 10:13 AM UTC

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.

Translate
Employee
Apr 11, 2024 7:30 AM UTC

Hey Indrajit, Were you able to resolve this ? 

Translate