While trying to update core.wcm.components from 2.17.12 to 2.20.8 i see few component test cases are failing when building the project .
testGetDefaultNewsTileImgSrc Time elapsed: 0.229 s <<< ERROR!
java.lang.NoClassDefFoundError: Lcom/adobe/cq/wcm/spi/AssetDelivery;
Caused by: java.lang.ClassNotFoundException: com.adobe.cq.wcm.spi.AssetDelivery
Please advise if you came across the same issue
Solved! Go to Solution.
Views
Replies
Total Likes
i have tried this but it did not work for me ; my uber-jar version is 6.5.12 , i have a feeling that this might be the problem ; when i update it to 6.5.13 the error is resolved ; we are using AEM 6.5.15
Hi @chandanaa9
It seems like you are encountering a NoClassDefFoundError for the class com.adobe.cq.wcm.spi.AssetDelivery after updating the core.wcm.components from version 2.17.12 to 2.20.8. This issue might be caused by missing dependencies in your project's pom.xml.
To fix this issue, you need to add the missing dependency related to com.adobe.cq.wcm.spi.AssetDelivery. In this case, it is part of the core.wcm.components.servicesmodule.
Add the following dependency to your pom.xml:
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.services</artifactId>
<version>2.20.8</version>
<scope>provided</scope>
</dependency>
If you still face issues, ensure that all your projects have the correct version of the dependencies. This includes the parent project, core project, and ui.apps project.
Here's a summary of the steps to update the dependencies:
<dependencies>
...
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<version>2.20.8</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.services</artifactId>
<version>2.20.8</version>
<scope>provided</scope>
</dependency>
...
</dependencies>
<plugins>
...
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>your-group</group>
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
<properties>
<acHandling>merge_preserve</acHandling>
</properties>
<subPackages>
<subPackage>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.all</artifactId>
</subPackage>
</subPackages>
</configuration>
</plugin>
...
</plugins>
After updating the dependencies, try building the project again. If you still encounter issues, ensure that all the projects have the correct version of the dependencies.
Thankyou
i have tried this but it did not work for me ; my uber-jar version is 6.5.12 , i have a feeling that this might be the problem ; when i update it to 6.5.13 the error is resolved ; we are using AEM 6.5.15
Views
Likes
Replies