Expand my Community achievements bar.

Getting error for some user After adding my user component

Avatar

Level 3

Hello Everyone,

 

I am getting error after adding one of my component that is user component. This error is coming only for some user.

 

Error:  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.adobe.aem.commons.assetshare.components.structure.UserMenu cannot be correctly instantiated by the Use API

 

 

 

Please suggest me what I need to for fix this issue

 

Please also see the log for this issue.

 

Caused by: 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.adobe.aem.commons.assetshare.components.structure.UserMenu cannot be correctly instantiated by the Use API

at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:510) [org.apache.sling.scripting.core:2.3.2]

at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:570) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) [org.apache.sling.engine:2.7.4]

at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:119) [com.day.cq.wcm.cq-wcm-core:5.12.164]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.4]

at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138) [com.day.cq.wcm.cq-wcm-core:5.12.164]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.4]

at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:278) [com.day.cq.wcm.cq-wcm-core:5.12.164]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.4]

at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91) [com.day.cq.wcm.cq-wcm-core:5.12.164]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.4]

at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94) [com.day.cq.cq-personalization:5.12.44]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.4]

at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:217) [com.adobe.granite.csrf:1.0.20.CQ650-B0002]

at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:323) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211) [org.apache.sling.engine:2.7.4]

at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104) [org.apache.sling.engine:2.7.4]

at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516) [com.day.cq.wcm.cq-wcm-core:5.12.164]

at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:179) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]

... 219 common frames omitted

 

8 Replies

Avatar

Level 7

The most likley reason is this is that an included model class returns a Null value. So go to html file from your component and look for:

 

<sly data-sly-use.<your sly-identifiere>="<full qualified java class>"/>

Then start the debugger in your IDE and find out why the including class returns Null.

Avatar

Level 3

@Magicr I have already check in User menu java class, i have already implement the null check. Actually this issue is coming only for some user not for all user. Mainly this issue is coming on prod so i am not able to debug the java code.

Avatar

Level 7

When the error message for only a couple of users occurs, then you have to check the existing user objects with some users which are working. May be there same properties are missing or the user object is corrupt in repository. You can export the user by creating a package. Use a program that can compare textfiles (I.e. Beoynd compare).

Avatar

Level 3

If user object is corrupt in repository then what i need to do for solving this issue.

Avatar

Level 7

Delete and recreate them. Also check the respository for hidden general failuers. Some errors on filesystem could run into respository errors.

Avatar

Employee Advisor

could you please check whether UserMenu Sling model is available in your instance using below and to what resources they are bound

http://aemhost:port/system/console/status-slingmodels

http://aemhost:port/system/console/adapters

http://aemhost:port/system/console/status-adapters

Avatar

Level 3

@DEBAL_DAS I have check in all 3 place UserMenu Sling model is available.

Avatar

Employee Advisor

As this error is coming only for some user, what are you trying to read(information) for each user when they are trying to add this component?