org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: cannot be resolved to a type | Community
Skip to main content
April 29, 2022
Solved

org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: cannot be resolved to a type

  • April 29, 2022
  • 2 replies
  • 8744 views

I am getting this error with my component
org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Compilation errors in xxxxxxxx: Line 45, column 2138 : com.project.name.core.xxxxx cannot be resolved to a type

 

is there any way to fix this? I also tried building my project/core but still not fix.

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 DEBAL_DAS

 1.Please check whether you project specific bundle is in active state using 

http://<aem-instance>:<port>/system/console/bundles -

2. Also I think you are facing this issue with Sling model. If yes, please check the presence of that sling model using http://<aem-instance>:<port>/system/console/adapters url as shown below -

 

Here CompaniesModel is my Sling model -

 

 

 

Please confirm all these first.

2 replies

DEBAL_DAS
DEBAL_DASAccepted solution
April 29, 2022

 1.Please check whether you project specific bundle is in active state using 

http://<aem-instance>:<port>/system/console/bundles -

2. Also I think you are facing this issue with Sling model. If yes, please check the presence of that sling model using http://<aem-instance>:<port>/system/console/adapters url as shown below -

 

Here CompaniesModel is my Sling model -

 

 

 

Please confirm all these first.

Vijayalakshmi_S
April 29, 2022

@justinnikolai11 

Looks like a compilation error in Line 45 in the respective class. 

Cross check the same in IDE/fix and then build the project.