Skip to main content
New Participant
August 15, 2016

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

  • August 15, 2016
  • 4 replies
  • 1703 views

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>

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

4 replies

smacdonald2008
New Participant
August 15, 2016

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

Sutty100Author
New Participant
August 15, 2016

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!

smacdonald2008
New Participant
August 15, 2016

Is it working now? 

Sutty100Author
New Participant
August 15, 2016

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.