Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

NoClassDefFoundError for Azure Identity Client in AEM as Cloud Service

mayank0928
Level 3
Level 3

Hi Everyone,

 

I have tried to add the maven dependency for Azure Java API, and also embedded these dependencies at bundle classpath and fixed some issues coming in Imported-Packages by excluding them and adding some required packages in Export-Packages, but then it's giving the NoClassDefFoundError for the IdentityClient Class.

 

Maven Dependency in core/POM.XML

mayank0928_0-1638186550326.png

 

BND-Maven Plugin Configurations

mayank0928_1-1638186985084.png

 

Exception (Servlet where I'm using this to create a new user in Azure AD)

mayank0928_2-1638186723222.png

 

Bundle Status

mayank0928_3-1638186812967.png

 

 

Can anyone give any suggestions for this?

 

1 Accepted Solution
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @mayank0928,

You can make use of maven-bundle-plugin to create/build OSGi bundle out of desired dependency (Azure Identity client in this case)

Ways of including it as part of project code base is available here - https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

 

View solution in original post

2 Replies
Vijayalakshmi_S
Correct answer by
Community Advisor
Community Advisor

Hi @mayank0928,

You can make use of maven-bundle-plugin to create/build OSGi bundle out of desired dependency (Azure Identity client in this case)

Ways of including it as part of project code base is available here - https://myaemlearnings.blogspot.com/2021/08/embedding-third-party-dependencyosgi.html

 

View solution in original post

mayank0928
Level 3
Level 3

Hi @Vijayalakshmi_S 

 

Thanks for the blog, I guess I can implement this to fulfill my requirements.

 

Thanks for the help!