NoClassDefFoundError for Azure Identity Client in AEM as Cloud Service | Community
Skip to main content
mayank0928
Level 3
Nov 29, 2021 11:54 AM UTC
Solved

NoClassDefFoundError for Azure Identity Client in AEM as Cloud Service

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

 

BND-Maven Plugin Configurations

 

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

 

Bundle Status

 

 

Can anyone give any suggestions for this?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
Nov 29, 2021 5:13 PM UTC

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

 

2 replies

Vijayalakshmi_S
Vijayalakshmi_SAccepted solution
Level 10
Nov 29, 2021 5:13 PM UTC

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

 

Translate
mayank0928
Level 3
Nov 30, 2021 9:19 AM UTC

Hi @vijayalakshmi_s 

 

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

 

Thanks for the help!

Translate