Expand my Community achievements bar.

SOLVED

when i click the option view as published, this issue happen

Avatar

Level 2

org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Identifier com.r.site.core.components.product.appearance.PanoramicCarViewingComponent cannot be correctly instantiated by the Use API

Cannot serve request to /content/r-site/cn/car-type.html on this server

1 Accepted Solution

Avatar

Correct answer by
Level 2

I found this Exception in my error.log file,my model class throw an IndexOutOfBoundsException,I have resolved this issue. Thank you sravs!

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @AnHuaZh ,

Have you used any custom models class in HTL to render the component? If yes, please apply a debug point in that and check where its failing. Also see in in browser console if you get any error.


Thanks
Tarun

Avatar

Level 6

Hi @AnHuaZh , 

The issue is due to the initialization of the model class com.r.site.core.components.product.appearance.PanoramicCarViewingComponent in your HTL. 

Please check on that page in which component, this model class has been used and you can verify your error.log file for more info about the error.

Avatar

Correct answer by
Level 2

I found this Exception in my error.log file,my model class throw an IndexOutOfBoundsException,I have resolved this issue. Thank you sravs!