cannot find symbol class WCMUse location: package com.adobe.cq.sightly | Community
Skip to main content
sreenu539
Level 7
September 28, 2018
Solved

cannot find symbol class WCMUse location: package com.adobe.cq.sightly

  • September 28, 2018
  • 2 replies
  • 2984 views

I am trying to scan AEM multi module project using sonar and got the following error. I have uber jar 6.3 version in pom files.

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------

[ERROR] /var/lib/jenkins/jobs/Experiments/jobs/SONAR-TEST-Modules-Scan/workspace/ui.apps/src/main/content/jcr_root/apps/sling/servlet/errorhandler/ResponseStatus.java:[3,28] cannot find symbol
  symbol: class WCMUse

  location: package com.adobe.cq.sightly

[ERROR] /var/lib/jenkins/jobs/Experiments/jobs/SONAR-TEST-Modules-Scan/workspace/ui.apps/src/main/content/jcr_root/apps/sling/servlet/errorhandler/ResponseStatus.java:[5,37] cannot find symbol
  symbol: class WCMUse

[ERROR] /var/lib/jenkins/jobs/Experiments/jobs/SONAR-TEST-Modules-Scan/workspace/ui.apps/src/main/content/jcr_root/apps/sling/servlet/errorhandler/ResponseStatus.java:[9,5] method does not override or implement a method from a supertype
[ERROR] /var/lib/jenkins/jobs/Experiments/jobs/SONAR-TEST-Modules-Scan/workspace/ui.apps/src/main/content/jcr_root/apps/sling/servlet/errorhandler/ResponseStatus.java:[11,9] cannot find symbol
  symbol: method getResponse()

  location: class apps.sling.servlet.errorhandler.ResponseStatus

I am not sure if I need to write maven felix plugin in pom.xml of ui.apps and import any artifacts.

The following is the code for which above error thrown:

package apps.sling.servlet.errorhandler;

import com.adobe.cq.sightly.WCMUse;

public class ResponseStatus extends WCMUse {

    public static final int SERVER_RESPONSE_CODE_404 = 404;

    @Override

    public void activate() throws Exception {

        getResponse().setStatus(SERVER_RESPONSE_CODE_404);

    }

}

Any ideas ??

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi,

Uber Jar 6.3 doesn't have WCMUse class, you can change your code to update WCMUse to WCMUsePojo.

2 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
September 29, 2018

Hi,

Uber Jar 6.3 doesn't have WCMUse class, you can change your code to update WCMUse to WCMUsePojo.

Arun Patidar
February 14, 2020
this worked for me. thanks for the help
Feike_Visser1
Adobe Employee
Adobe Employee
September 29, 2018

Indeed, this has been removed I think since 6.2