Highlighted

Problem when running an AEM 6.0 application on AEM 6.2

Avatar

Avatar

lebom50735824

Avatar

lebom50735824

lebom50735824

29-07-2016

I installed AEM 6.2 in my laptop in Windows and then I downloaded packages from our 6.0 application and installed them. When I look at the application's bundle, I see that some packages can't be resolved. The description from the console is : 

com.adobe.xmp,version=[0.0,1) -- Cannot be resolved
com.day.cq.commons,version=[5.7,6) -- Cannot be resolved
com.day.cq.commons.jcr,version=[5.7,6) -- Cannot be resolved
com.itextpdf.text -- Cannot be resolved
com.itextpdf.text.pdf -- Cannot be resolved
com.itextpdf.text.pdf.codec -- Cannot be resolved
com.nimbusds.jose,version=[4.12,5) -- Cannot be resolved
com.nimbusds.jose.crypto,version=[4.12,5) -- Cannot be resolved
com.nimbusds.jwt,version=[4.12,5) -- Cannot be resolved
com.siml.portal.registration -- Cannot be resolved

When I look at our pom files, the packages com.adobe.xmp, com.day.cq.commons and com.day.cq.commons.jcr for instance, are not there as dependencies. I thought I could change the version numbers for these packages. My two questions are, where can I change these version numbers?What are the bundles that could be exporting these packages? 

Regards

Lebo

Replies

Highlighted

Avatar

Avatar

GK-AEM

Avatar

GK-AEM

GK-AEM

30-07-2016

And also try build your application using uber jar.This avoids maintaining the each and every dependency related to AEM.

Note:Still you need to include the if there are 3rd party jar's dependencies.

<dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>uber-jar</artifactId>
                <version>6.2.0</version>
                <classifier>obfuscated-apis</classifier>
                <scope>provided</scope>
</dependency>

Highlighted

Avatar

Avatar

lebom50735824

Avatar

lebom50735824

lebom50735824

01-08-2016

I included this dependency in my pom file but after successfully building the application, the uber jar file is not downloaded.

Highlighted

Avatar

Avatar

GK-AEM

Avatar

GK-AEM

GK-AEM

01-08-2016

Ideally jar should be downloaded.

 

Where are you checking??

-Kishore

Highlighted

Avatar

Avatar

lebom50735824

Avatar

lebom50735824

lebom50735824

01-08-2016

I looked at my local repo.

Lebo

Highlighted

Avatar

Avatar

Vaibhav

Avatar

Vaibhav

Vaibhav

15-08-2016

Hi Lebo,

I am also having same issue. Lots of bundles are not resolved. Depfinder dependency version and repo version are different tried to include uber-jar with classifier "apis" but repo has corrupted jar file and "obfuscated-apis"  is not resolving the issue. Did you got any solution ?

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

15-08-2016

Are you using Maven 10 Archetype to build the project on 6.2. Even when we update sample apps for AEM from 6 to 6.2 - quite often its a combination of ensuring we get the URBER jar in the Project POM and then making sure we get the correct dependencies under core POM. 

For example - when getting SLING MODELs to work on 6.2 - we needed these POM dependencies: 

<dependency>
    <groupId>org.apache.geronimo.specs</groupId>
    <artifactId>geronimo-atinject_1.0_spec</artifactId>
    <version>1.0</version>
    <scope>provided</scope>
</dependency>
 
<dependency>
            <groupId>com.adobe.aem</groupId>
            <artifactId>uber-jar</artifactId>
            <classifier>obfuscated-apis</classifier>
</dependency>

 

Otherwise, 6.0 code would not work.

 

See this article as a guideline:

 

https://helpx.adobe.com/experience-manager/using/slingmodel_62.html

 

Hope this helps

Highlighted

Avatar

Avatar

lebom50735824

Avatar

lebom50735824

lebom50735824

16-08-2016

To get my code to build, I replaced the following dependencies

       <dependency>
            <groupId>com.adobe.aem</groupId>
            <artifactId>aem-api</artifactId>
        </dependency>

        and

        <dependency>
                <groupId>com.adobe.aem</groupId>
                <artifactId>aem-api</artifactId>
                <version>6.0.0.1</version>
                <scope>provided</scope>
        </dependency>
        with  

                <dependency>
                      <groupId>com.adobe.aem</groupId>
                      <artifactId>uber-jar</artifactId>
                      <version>6.2.0</version>
                      <classifier>nonobfuscated-apis</classifier>
                      <scope>provided</scope>
                </dependency>

Highlighted

Avatar

Avatar

Vaibhav

Avatar

Vaibhav

Vaibhav

16-08-2016

Hi Lebo,

Thanks for the response. I tried with the first option it is working fine. There was a typ0 error in Sling-Model-Package name earlier but still I have an issue with ACS commons package. I am using ACS common with some customizations. ACS commons also updated there pom file to support 6.2 but they used "uber-jar-apis.jar" which is not available in adobe repository(https://repo.adobe.com/nexus/content/groups/public/com/adobe/aem/uber-jar/6.2.0/). I can not use "uber-jar-6.2.0.-obfuscated-apis.jar" bcz they are using some method which is available in "uber-jar-apis.jar" only. Do you have any work around for this ?

 

Appreciate your help. Thanks

Highlighted

Avatar

Avatar

Vaibhav

Avatar

Vaibhav

Vaibhav

16-08-2016

Hi Lebo,

I got the solution. The "uber-jar-6.2.0-apis.jar" is available in adobe products page(https://daycare.day.com/home/products/uberjar.html). We need to download from there. To install it in .m2 folder follow the below step.

1. Navigate to uber-jar directory (C:\Users\xxxx\.m2\repository\com\adobe\aem\uber-jar\6.2.0)

2. run the below maven command:

mvn install:install-file -Dfile=cq-quickstart-6.2.0-apis.jar -DgroupId=com.adobe.aem -DartifactId=uber-jar -Dversion=6.2.0 -Dclassifier=apis -Dpackaging=jar