Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

how to fix this code scanner report issue in AEMaaCS

Avatar

Level 4

The product interface org.apache.sling.api.resource.Resource annotated with @ProviderType should not be implemented by custom code. Detected in com.day.cq.wcm.api.TemplatedResource contained in /apps/aem-app-packages/application/install/core-aemapp.core-1.0.0-SNAPSHOT.jar.

 

The product interface com.day.cq.wcm.api.Page annotated with @ProviderType should not be implemented by custom code. Detected in com.day.cq.wcm.api.msm.Blueprint contained in /apps/aem-app-packages/application/install/core-aemapp.core-1.0.0-SNAPSHOT.jar.

Rule:

CQRules:CQBP-84

https://www.adobe.com/go/aem_cmcq_cqbp-84_en

 

i don't have any custom code which implement Resource but still i'm getting this issue reported.

 

Does anyone know that how to fix it?  

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @vkarthick ,

 

Even if you don't have any explicit custom code implementing these interfaces, the issue could be caused by third-party libraries or dependencies included in your project.

 

Use tools like the Apache Sling Feature Model Analyzer (https://github.com/apache/sling-org-apache-sling-feature-analyser) or other dependency analysis tools to identify which packages are causing the issue. This can help you pinpoint the source of the problem and take appropriate action. Also review AEM versions and compatibility.

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi @vkarthick ,

 

Even if you don't have any explicit custom code implementing these interfaces, the issue could be caused by third-party libraries or dependencies included in your project.

 

Use tools like the Apache Sling Feature Model Analyzer (https://github.com/apache/sling-org-apache-sling-feature-analyser) or other dependency analysis tools to identify which packages are causing the issue. This can help you pinpoint the source of the problem and take appropriate action. Also review AEM versions and compatibility.

 

Avatar

Employee Advisor

Hi,

 

This issue occurs when interfaces like org.apache.sling.api.resource.Resource and com.day.cq.wcm.api.Page annotated with @ProviderType are implemented by custom code, which is not recommended. To fix the problem:

  1. Check if there is any custom code present in the mentioned JAR file.
  2. Verify if any third-party dependencies in the JAR file implement these interfaces.