Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Error While trying to update core.wcm.components from 2.17.12 to 2.20.8

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 2

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 

View solution in original post

2 Replies

Avatar

Level 4

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:

  1. Edit pom.xml and add the core.wcm.components.core and core.wcm.components.servicesdependencies in the <dependencies> section.

<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>

  1. Edit core/pom.xml and add the core.wcm.components.coredependency to the dependency list.
  2. <dependencies>
    ...
    <dependency>
    <groupId>com.adobe.cq</groupId>
    <artifactId>core.wcm.components.core</artifactId>
    </dependency>
    ...
    </dependencies>
  3. Edit ui.apps/pom.xml and add the core.wcm.components.allzip as a dependency in the dependency list.
  4. <dependencies>
    ...
    <dependency>
    <groupId>com.adobe.cq</groupId>
    <artifactId>core.wcm.components.all</artifactId>
    <type>zip</type>
    <version>2.20.8</version>
    <scope>provided</scope>
    </dependency>
    ...
    </dependencies>
  1. Edit ui.apps/pom.xml and include core.wcm.components.all zip as a sub-package.

 

<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

 

 

Avatar

Correct answer by
Level 2

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