In author local instance, receiving 500 org.apache.sling.sightly.SightlyException error | Community
Skip to main content
New Participant
February 13, 2024

In author local instance, receiving 500 org.apache.sling.sightly.SightlyException error

  • February 13, 2024
  • 6 replies
  • 2173 views

When I try to View as Published in author local, I get the following error:

org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/xxxx__002d__xxxx/components/breadcrumb/breadcrumb__002e__html.java: Line 136, column 7788 : com.xxxx.xxxx.core.models.BreadCrumbModel cannot be resolved to a type

Cannot serve request to /content/xxxx-xxxx/us/en/home/test.html in /apps/xxxx-xxxx/components/breadcrumb/breadcrumb.html

 

Not sure how to troubleshoot, I appreciate any and all help. Thanks!

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

    6 replies

    kautuk_sahni
    Employee
    February 16, 2024

    @kbsniquer Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

    Kautuk Sahni
    Imran__Khan
    New Participant
    February 13, 2024

    @kbsniquer @Please share screenshot for the bundle having dependency in red.

    Goto /console/bundles.. select project having breadcrumb class, click on that project and check if something highlighted there in red

    kbsniquerAuthor
    New Participant
    February 13, 2024

    These are in red:

    com.adobe.cq.dam.cfm,version=[1.12,2) -- Cannot be resolved
    com.adobe.cq.wcm.core.components.models,version=[12.26,13) -- Cannot be resolved

    org.apache.sling.api.request,version=[2.7,3) -- Cannot be resolved

    Imran__Khan
    New Participant
    February 13, 2024

    There can be below things:

    1. Check if specific bundle is active

    2. It can be n issue with Breadcrum sling models. It is not able to properly injected due to some invalid code written within slimg model.

    3. Did we provide the correct package and Class name in sightly.

    4. There can be any issue with on of the service which is getting reference in Breadcrumn model 

    5. Some dependency bundles are not available.

     

    It can be 4th and 5th point in your case

    DPrakashRaj
    New Participant
    February 13, 2024

    As clear from log that it is a compilation error on html 

    Compilation errors in org/apache/sling/scripting/sightly/apps/xxxx__002d__xxxx/components/breadcrumb/breadcrumb__002e__html.java: Line 136, column 7788 com.xxxx.xxxx.core.models.BreadCrumbModel

    cannot be resolved to a type

    check breadcrumb.html if the Java class that you are calling is correct? 

    com.xxxx.xxxx.core.models.BreadCrumbModel

     

    can you also share how you are calling Java class on html?

     

    ayush-anand
    New Participant
    February 13, 2024

    Hi @kbsniquer Can you check if the bundle is in active state (http://localhost:4502/system/console/bundles). Also you can check if the sling model is registered here (http://localhost:4502/system/console/status-slingmodels) and you are using the same package name in the sightly code.

     

    Regards,

    Ayush

    Kamal_Kishor
    New Participant
    February 13, 2024

    @kbsniquer : Please check if your bundles are up and Active. Specifically check the bundle where you have defined the BreadCrumbModel sling model class.
    I am sure there are some errors and once you resolve them and bundle(s) are in Active status, the errors would go away.

    thanks.

    Kamal_Kishor
    New Participant
    February 13, 2024

    @kbsniquer : Please see here a similar issue where user was seeing same error i.e  'cannot be resolved to a type' -
    https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/com-adobe-aem-spa-project-core-models-page-cannot-be-resolved-to/m-p/419499