Application Insights dependency issue in AEM | Community
Skip to main content
New Participant
Feb 16, 2021 12:43 PM UTC
Solved

Application Insights dependency issue in AEM

I have included the maven dependency for application insights as below

 

<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>applicationinsights-web-auto</artifactId>
<version>2.5.0</version>
<scope>provided</scope>
</dependency>

 

After that also Im facing the following error in OSGI bundle

com.microsoft.applicationinsights -- Cannot be resolved
com.microsoft.applicationinsights.channel -- Cannot be resolved
com.microsoft.applicationinsights.extensibility -- Cannot be resolved
com.microsoft.applicationinsights.extensibility.context -- Cannot be resolved
com.microsoft.applicationinsights.internal.util -- Cannot be resolved
com.microsoft.applicationinsights.telemetry -- Cannot be resolved

Java 11

AEM 6.5
Can anyone pls tell me how to resolve the issue..

TIA

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Feb 20, 2021 5:06 PM UTC

It's not sufficient to just add the maven dependencies to the build classpath, because these dependencies are not present by default in the runtime (in AEM itself). So you either add these dependencies as OSGI dependencies to your content package, or you embed these dependencies into your application bundle.

4 replies

Level 8
May 7, 2021 7:48 AM UTC
Hi, did you find a way to solve this?
Translate
joerghoh
joerghohAccepted solution
Employee
Feb 20, 2021 5:06 PM UTC

It's not sufficient to just add the maven dependencies to the build classpath, because these dependencies are not present by default in the runtime (in AEM itself). So you either add these dependencies as OSGI dependencies to your content package, or you embed these dependencies into your application bundle.

Translate
Anudeep_Garnepudi
New Participant
Feb 16, 2021 1:07 PM UTC

@archana_va_007 

Remove <scope>provided</scope> and check once, which means the container (here OSGi) is providing the implementation for that. 

Check the scope instructions: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope

 

Translate
New Participant
Feb 16, 2021 2:58 PM UTC
When it removed following err happened
Translate