Import of com.adobe.cq.wcm.core.components.models is looking for wrong version | Community
Skip to main content
Level 2
February 17, 2023
Solved

Import of com.adobe.cq.wcm.core.components.models is looking for wrong version

  • February 17, 2023
  • 1 reply
  • 8225 views

Hello all,

 

I'm currently working on an AEM as a Cloud Service project w/ multiple child sites in the code base (see very basic structure below). We use a global package to share common code between the sites. Unfortunately in the web console bundle list I'm seeing that the core bundle for site1 is 'Installed' rather than 'Active' due a missing dependency -- full message as follows: 

com.adobe.cq.wcm.core.components.models,version=[12.26,13) -- Cannot be resolved

 

When I dig into that bundle, I can see it's being exported from com.adobe.cq.core.wcm.components.core  (as intended) but the version is 12.25.

 

My global.core package has no problem using this bundle, and both pom.xml files for global and site1 have the below code where the version is set to 2.19.0 (odd in and of itself as the version is clearly 2.20.8 in depfinder... so maybe this a piece of the puzzle I'm missing)

 

<dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.core</artifactId> <version>${core.wcm.components.version}</version> </dependency>

 

I'm wondering what is causing my site1.core bundle to look for that specific version of com.adobe.cq.wcm.core.components.models... does anyone have any suggestions as to where I should look? Could it be I'm importing a component in site1.core that is only defined in version 12.26 - 13 (fwiw I was hard pressed to find specific documentation on com.adobe.cq.wcm.core.components.models version 12.26+) ? Or should I take a deeper dive into my pom files to try and reconcile some dep stuff? I'm a little lost as to where the version is defined (in code) for com.adobe.cq.wcm.core.components.models. Maybe I should look into upgrading my core components? Any help is greatly appreciated!

 

Basic Code Structure

 

-site1

-site2

-dispatcher

-global

-pom.xml

 

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

Hi @user00928 ,

 

with AEMaaCS, the core component bundle comes along with the SDK. I mean, whenever you upgrade your SDK, the bundle comes along with the latest version available.

I would recommend you remove the dependency from your POM file if you wish to refer to the latest version each time. Else, make sure you use the same SDK version and desired core components version through your POM dependencies.

The bundle is in an active state because of the redundancy of the same bundle being deployed twice(one through SDK and one through your project).

Thank you,
Sravan

1 reply

B_Sravan
Community Advisor
B_SravanCommunity AdvisorAccepted solution
Community Advisor
February 18, 2023

Hi @user00928 ,

 

with AEMaaCS, the core component bundle comes along with the SDK. I mean, whenever you upgrade your SDK, the bundle comes along with the latest version available.

I would recommend you remove the dependency from your POM file if you wish to refer to the latest version each time. Else, make sure you use the same SDK version and desired core components version through your POM dependencies.

The bundle is in an active state because of the redundancy of the same bundle being deployed twice(one through SDK and one through your project).

Thank you,
Sravan