Expand my Community achievements bar.

SOLVED

NoClassDefFoundError for Azure Identity Client in AEM as Cloud Service

Avatar

Level 4

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

Avatar

Correct answer by
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

Avatar

Correct answer by
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

 

Avatar

Level 4

Hi @Vijayalakshmi_S 

 

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

 

Thanks for the help!