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

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

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

28-09-2018

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 ??

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,279 likes

Total Posts

3,153 posts

Correct Reply

889 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

28-09-2018

Hi,

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

Screen Shot 2018-09-29 at 12.10.22 PM.png

Answers (1)

Answers (1)

Avatar

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct Reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct Reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Feike_Visser1
Employee

29-09-2018

Indeed, this has been removed I think since 6.2