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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

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

0 Replies

Avatar

Correct answer by
Community 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.