AEM 65 JDK 11 upgrade from AEM 64 JDK 8, please help with dependancy errors | Community
Skip to main content
kedar0910
Level 2
January 30, 2024
Solved

AEM 65 JDK 11 upgrade from AEM 64 JDK 8, please help with dependancy errors

  • January 30, 2024
  • 5 replies
  • 1747 views

We are upgrading our AEM 6.4.7 with jdk 8 instance to AEM 6.5.17 with jdk 11 and I am not able to resolve below dependancies. I dont see any of these import statements in our project. any help greatly appreicated. 

org.apache.xml.security,version=[2.2,3) -- Cannot be resolved
org.apache.xml.security.encryption,version=[2.2,3) -- Cannot be resolved
org.apache.xml.security.exceptions,version=[2.2,3) -- Cannot be resolved
org.apache.xml.security.utils,version=[2.2,3) -- Cannot be resolved
org.aspectj.lang -- Cannot be resolved
org.aspectj.lang.annotation -- Cannot be resolved

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 kedar0910

Thank you all for your reply, I was able resolve most of the dependancy errors by starting my AEM , after I point my java version to JDK 11, now I am having few more dependancy errors. I dont see any of these imports in my code base.  any thoughts ? 

5 replies

DPrakashRaj
Community Advisor
Community Advisor
January 31, 2024

1) Can you check which package/dependency is adding the reported on org.apache.xml.security http://localhost:4502/system/console/depfinder

2) have you updated the aem Uber jar to 6.5.17

aanchal-sikka
Community Advisor
Community Advisor
January 31, 2024

Hello @kedar0910 

 

If the dependencies are not available in AEM, you can consider deploying them. 

You would need to <embed> them in all module of the project. Example:

<!-- Embed section of all/pom.xml--> <embedded> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <type>jar</type> <target>/apps/techrevel-packages/application/install</target> </embedded> <!-- Dependency section of all/pom.xml--> <dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> </dependency>

https://techrevelhub.wordpress.com/2023/09/27/managing-third-party-dependencies-in-aem/

 

I would request you to update the versions of the dependencies based on Maven repository.

Aanchal Sikka
TarunKumar
Community Advisor
Community Advisor
January 31, 2024

Hi @kedar0910 ,

Make sure you follow below steps when you are upgrading both AEM and JDK:

1. SP 17 installed in AEM.
2. Correct uber-jar version which is 6.5.17 in your case.

3. jdk version should be 11.
4. Once you are done with the above steps check in your pom file if you are seeing any incompatibility issue with other dependencies try to fix that. Most of them are highlighted in ide.
5. Also make sure your "maven-bundle-plugin" is of correct compatible version like 5.1.9.

Thanks
Tarun

kautuk_sahni
Community Manager
Community Manager
February 2, 2024

@kedar0910 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
kedar0910
kedar0910AuthorAccepted solution
Level 2
February 2, 2024

Thank you all for your reply, I was able resolve most of the dependancy errors by starting my AEM , after I point my java version to JDK 11, now I am having few more dependancy errors. I dont see any of these imports in my code base.  any thoughts ? 

kedar0910
kedar0910Author
Level 2
February 6, 2024

I was able to resolve these two dependancy errors by adding them to be ignored in Import-Pacakge in pom.xml

<Import-Package>
!sun.misc.*,
!java.sql
</Import-Package>

Thank you all for your responses. Appreciate it.