Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 2

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 ? 

View solution in original post

6 Replies

Avatar

Community Advisor

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

Avatar

Community Advisor

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

Avatar

Community Advisor

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

Avatar

Administrator

@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

Avatar

Correct answer by
Level 2

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 ? 

Avatar

Level 2

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.