org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: | Community
Skip to main content
sursharma
May 26, 2022

org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript:

  • May 26, 2022
  • 1 reply
  • 2151 views

I can see bundle as in active stage on system/console but while hitting the page, getting this error -

 

org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Compilation errors in org/apache/sling/scripting/sightly/apps/...../head_html.java: Line 47, column 2148 : com.....core.page.PageModel cannot be resolved to a type Line 127, column 6223 : com....core.components.configuration.market....Model cannot be resolved to a type
Cannot serve request to /content/.....dashboard.html in /apps/.....abstractPageRenderer.html

Exception:
org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Compilation errors in org/apache/sling/scripting/sightly/apps/...../head_html.java:
Line 47, column 2148 : com......core.page.PageModel cannot be resolved to a type
Line 127, column 6223 : com.......core.components.configuration.market....Model cannot be resolved to a type

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Anmol_Bhardwaj
Community Advisor
Community Advisor
May 26, 2022

This usually happens when there is an error in the sightly script, or the included files present in that script. 

Now, if this was component specific, you would get the page, but the component would not be visible. But, as the whole page is not visible, I suspect something wrong in the template's html file on which this page is created.

 

You can check error logs , I'm pretty sure, you would get to the .html file of the template whose structure component is having this error.

 

sursharma
sursharmaAuthor
May 26, 2022

But same thing is working for gradle project when we migrated to maven then getting this issue.

Anmol_Bhardwaj
Community Advisor
Community Advisor
May 27, 2022

It could be due to an OOTB version conflict or an dependency version conflict which will not show up in the bundle but could be present anyway. I would suggest you go through the error logs once, you would find the responsible piece of code.