Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

 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 -

 

DEBAL_DAS_2-1651240254746.png

 

DEBAL_DAS_3-1651240339942.png

 

Please confirm all these first.

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

 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 -

 

DEBAL_DAS_2-1651240254746.png

 

DEBAL_DAS_3-1651240339942.png

 

Please confirm all these first.

Avatar

Community Advisor

@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.