Expand my Community achievements bar.

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

My bundle is trying to import wrong version of AEM bundle (6.2)

Avatar

Level 5

My bundle is failing to start because it is trying to import the wrong version of an AEM bundle. I have not added any dependencies, just added in some code that has caused this bundle to be required. My bundle is throwing errors because it is looking for:

com.day.cq.personalization,version=[5.8,6) -- Cannot be resolved

 

but I can see in felix that  there is:

      
490
 
5.9.292

I don't think that I have updated the bundle myself or anything. How can I specifically tell my bundle to look for the newer version? I have tried adding it as a dependency and specifically setting the version number but that version can't be available in any public repo as it fails to resolve. I have also tried in the import-package section of my bundle specifying the version but that seems to be ignored: 

<Import-Package>

                            *,!com.google.gson, com.day.cq.personalization;version="[5.9.292)"

 </Import-Package>

4 Replies

Avatar

Level 5

From what I have worked out this dependency is pulling in the older personalisation code:

<dependency>

                <groupId>com.adobe.aem</groupId>

                <artifactId>aem-api</artifactId>

                <version>6.0.0.1</version>

                <scope>provided</scope>

 </dependency>

but if I remove it then my code will not compile and I can only in the public repo find newer versions that are in BETA.

Avatar

Level 10

Have you tried adding the URBER AEM JAR file to the project for 6.2?

Avatar

Level 5

I had the Uber JAR in my top level POM and the dependency I posted. They must of been clashing and it was picking up the older dependency. I've gone through and removed any reference to the aem-api dependency. 

Thanks!