Error: cannot find symbol | Community
Skip to main content
guanlun_mu1
November 3, 2015
Solved

Error: cannot find symbol

  • November 3, 2015
  • 5 replies
  • 4036 views

Hi all, 

I'm a beginner for AEM and I'm currently following the the AEM Back-end Developer video training. In one of the lessons, when I try to "mvn clean install -P full" project to the crx lite, I got an error:

 

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project company-core: Compilation failure [ERROR] C:\Users\guanlun.mu\Desktop\videoTraining\company\company-core\src\main\java\com\adobe\training\core\CleanupServiceImpl.java:[44,65] error: cannot find symbol

 

The code I used was directly copy-pasted from the student file downloaded from the course, so the code itself should be OK. I'm thinking it may be some maven config error but I'm not sure. Anyone have same error? Lots of thanks! 

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 smacdonald2008

[Best Practices to use]

Never use CRXIE to create an OSGI bundle. Use Maven. See this community article to get you up and running. http://scottsdigitalcommunity.blogspot.ca/2014/05/creating-your-first-aem-service-using.html. There are tons of other AEM articles listed on this blog too that point to Adobe AEM articles.

[Answer]

Thanks a lot, the problem is solved, it's actually an AEM version issue. Apparently AEM 6.1 and after doesn't support the getDefaultWorkspace() method as a login method, so that's why when I was trying to do so, it has this error, which doesn't happen on the video guy who has a AEM 6.0. Also, thanks for the article! 

5 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
November 3, 2015

[Best Practices to use]

Never use CRXIE to create an OSGI bundle. Use Maven. See this community article to get you up and running. http://scottsdigitalcommunity.blogspot.ca/2014/05/creating-your-first-aem-service-using.html. There are tons of other AEM articles listed on this blog too that point to Adobe AEM articles.

[Answer]

Thanks a lot, the problem is solved, it's actually an AEM version issue. Apparently AEM 6.1 and after doesn't support the getDefaultWorkspace() method as a login method, so that's why when I was trying to do so, it has this error, which doesn't happen on the video guy who has a AEM 6.0. Also, thanks for the article! 

Ratna_Kumar
Level 10
November 4, 2015

Hi,

As you are beginner in CQ5, use Maven to create OSGI bundle is the better way. Never use CRXDE. 

As scott stated, there are many community articles which creates OSGI bundle using maven. Look at this link: https://helpx.adobe.com/marketing-cloud/experience-manager.html  which contains most of the articles of it.

Thanks,
Ratna Kumar.

guanlun_mu1
November 4, 2015

Thanks a lot, the problem is solved, it's actually an AEM version issue. Apparently AEM 6.1 and after doesn't support the getDefaultWorkspace() method as a login method, so that's why when I was trying to do so, it has this error, which doesn't happen on the video guy who has a AEM 6.0. Also, thanks for the article! 

Ratna_Kumar
Level 10
November 4, 2015

That's Great!!

smacdonald2008
Level 10
November 4, 2015

I am glad to hear that. Be sure to refer to our AEM Community page for many AEM articles and other AEM content:

https://helpx.adobe.com/marketing-cloud/experience-manager.html