I was trying to build the custom code in Cloud Service Environment getting below trace and unable to run sonar checks.
Let me know if anyone had similar issue and any solutions helped?
Error Trace-
Unable to run check class com.adobe.platform.experience.selfservice.cqrules.checks.java.UnableToSupportSlingSchedulerCheck - AMSCORE-554 on file /build_root/build/****/core/src/main/java/***************.java, To help improve SonarJava, please report this problem to SonarSource : see https://www.sonarqube.org/community/
java.lang.NullPointerException: null
at com.adobe.platform.experience.selfservice.cqrules.checks.java.UnableToSupportSlingSchedulerCheck.getClassFullyQualifierName(UnableToSupportSlingSchedulerCheck.java:82)
at com.adobe.platform.experience.selfservice.cqrules.checks.java.UnableToSupportSlingSchedulerCheck.visitNode(UnableToSupportSlingSchedulerCheck.java:67)
Solved! Go to Solution.
Views
Replies
Total Likes
@agubrani yea I was able to figure out issue. Removed few java class causing issues and checked build it worked you can also try to figure out what the actual issue.
Our code based had Sling Commons Scheduler and other external API so had to upgrade it to sling job
Hi @manjunathdj ,
Check if you are using Sling Commons Scheduler in your codebase, it looks related to it.
The use of Sling Commons Scheduler is not supported by AEM as a Cloud Service because it cannot guarantee to process when AEM environments are recreated, you could use Sling Jobs instead.
https://blog.developer.adobe.com/handling-sling-schedulers-in-aem-as-a-cloud-service-cb59d5e59e9
Documentation for Sling jobs:-
If that's not the case, open a support ticket so that team can take a deeper look if it's a false positive.
Hope this helps!
Regards,
Nitesh
@nitesh_kumar - Thanks for your reply I'm not using Sling Commons Scheduler in code but code is using 3rd party biweekly API let me open adobe ticket to have deeper look.
Hi @manjunathdj,
Did you find out what was causing this? I am also getting similar issues with my build.
Thanks,
Ankit
@agubrani yea I was able to figure out issue. Removed few java class causing issues and checked build it worked you can also try to figure out what the actual issue.
Our code based had Sling Commons Scheduler and other external API so had to upgrade it to sling job
Got it, thanks for the reply @manjunathdj
Views
Likes
Replies