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
BedrockMission!

Learn More

View all

Sign in to view all badges

Application Insights dependency issue in AEM

Avatar

Avatar
Level 1
Archana_VA_007
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
Archana_VA_007
Level 1

Likes

0 likes

Total Posts

6 posts

Correct Reply

0 solutions
View profile
Archana_VA_007
Level 1

16-02-2021

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

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,114 likes

Total Posts

3,148 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,114 likes

Total Posts

3,148 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

20-02-2021

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.

Answers (1)

Answers (1)

Avatar

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

274 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
Anudeep_Garnepudi
MVP

Likes

274 likes

Total Posts

320 posts

Correct Reply

87 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
Anudeep_Garnepudi
MVP

16-02-2021

@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_Sc...