Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Error on Publisher: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.

Avatar

Level 2

Hello everyone,

 

I get the following error on the Publish instance when I deploy new changes. 

 

Any idea what this could be ?

 

Thank you for your help

 

mariops_0-1667895174884.png

 

 

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: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:510)
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574)
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88)
	at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:119)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:278)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	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:78)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:323)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
	at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:179) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	... 207 common frames omitted
Caused by: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:184) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	at com.adobe.cq.sightly.internal.extensions.ResourceExtension.call(ResourceExtension.java:138) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:77) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.sightly.libs.wcm.foundation.components.responsivegrid.responsivegrid_html.render(responsivegrid_html.java:119)
	at org.apache.sling.scripting.sightly.render.RenderUnit.render(RenderUnit.java:50) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
	at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:60) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
	... 228 common frames omitted
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: Operands are not of the same type: comparison is supported for Number types only.
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:510)
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574)
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88)
	at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:119)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:278)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	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:78)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:323)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
	at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:179) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	... 236 common frames omitted
Caused by: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:184) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	at com.adobe.cq.sightly.internal.extensions.ResourceExtension.call(ResourceExtension.java:138) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:77) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.sightly.libs.wcm.foundation.components.responsivegrid.responsivegrid_html.render(responsivegrid_html.java:119)
	at org.apache.sling.scripting.sightly.render.RenderUnit.render(RenderUnit.java:50) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
	at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:60) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
	... 257 common frames omitted
Caused by: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:510)
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574)
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88)
	at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:119)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:278)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	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:78)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:323)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
	at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:179) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	... 265 common frames omitted
Caused by: org.apache.sling.scripting.sightly.SightlyException: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:184) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	at com.adobe.cq.sightly.internal.extensions.ResourceExtension.call(ResourceExtension.java:138) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:77) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.sightly.apps.asset__002d__share__002d__commons.components.search.results.results_html.render(results_html.java:141)
	at org.apache.sling.scripting.sightly.render.RenderUnit.render(RenderUnit.java:50) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
	at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:60) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
	... 286 common frames omitted
Caused by: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: Operands are not of the same type: comparison is supported for Number types only.
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:510)
	at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574)
	at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88)
	at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:119)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:138)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:249)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94)
	at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78)
	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:78)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283)
	at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:323)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
	at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
	at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
	at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:179) [com.adobe.cq.sightly.cq-wcm-sightly-extension:1.6.0]
	... 294 common frames omitted
Caused by: org.apache.sling.scripting.sightly.compiler.SightlyCompilerException: Operands are not of the same type: comparison is supported for Number types only.
	at org.apache.sling.scripting.sightly.compiler.expression.nodes.BinaryOperator.leq(BinaryOperator.java:214) [org.apache.sling.scripting.sightly.compiler:1.1.2.1_4_0]
	at org.apache.sling.scripting.sightly.apps.asset__002d__share__002d__commons.components.search.results.result.card.card_html.render(card_html.java:128)
	at org.apache.sling.scripting.sightly.render.RenderUnit.render(RenderUnit.java:50) [org.apache.sling.scripting.sightly.runtime:1.1.0.1_4_0]
	at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:60) [org.apache.sling.scripting.sightly:1.1.2.1_4_0]
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
	at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
	... 315 common frames omitted

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
2 Replies

Avatar

Correct answer by
Community Advisor

Similar issue discussed here - https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/operands-are-not-of-the-sa...

 

Please check if this helps

 

Thanks

Dipti

Avatar

Community Advisor

This is due to wrong comparison between the types in slightly code  check all the conditions and make sure proper datatype are compared.