SightlyCompilerException: BinaryOperator.strictEq(BinaryOperator.java:238) | Community
Skip to main content
kabelol26243436
Level 2
September 29, 2017
Solved

SightlyCompilerException: BinaryOperator.strictEq(BinaryOperator.java:238)

  • September 29, 2017
  • 4 replies
  • 1986 views

Hi all

After upgrading from 6.1 to 6.3, my HTML page is not rendering. A sightly compiler exception is thrown when browser sends request for this page.

This exeption ony occurs on publish, the author instance can render the page just fine.

My component is of type wcm/foundation/components/page

27.09.2017 10:15:31.272 ERROR [10.5.2.154 [1506500131064] GET /content/suninternational/properties/table-bay.html HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException org.apache.sling.scripting.sightly.compiler.SightlyCompilerException: Operands are not of the same type: the equality operator can only be applied to String, Number and Boolean types. at org.apache.sling.scripting.sightly.compiler.expression.nodes.BinaryOperator.strictEq(BinaryOperator.java:238) at org.apache.sling.scripting.sightly.apps.suninternational.components.content.flyoutCompone nt.flyoutComponent_html.render(flyoutComponent_html.java:81)

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

can't you do ${list}?

4 replies

smacdonald2008
Level 10
September 29, 2017

This should not be happening and appears to be a upgrade bug. Please open a support ticket as you may require a hotfix.

kabelol26243436
Level 2
September 29, 2017

The cause was this line of code:
data-sly-test="${list[0] !=null}"

Replaced it with:

data-sly-test="${list.size != null}"

I am not seeing adverse effects from this change. Any issues you can think of with this change?

Feike_Visser1
Adobe Employee
Feike_Visser1Adobe EmployeeAccepted solution
Adobe Employee
September 29, 2017

can't you do ${list}?

kabelol26243436
Level 2
October 3, 2017

Thanks guys

feike_visser​ made the change as you've suggested. Works fine.