Expand my Community achievements bar.

SOLVED

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

Avatar

Level 3

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)

1 Accepted Solution

Avatar

Correct answer by
Employee

can't you do ${list}?

View solution in original post

4 Replies

Avatar

Level 10

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

Avatar

Level 3

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?

Avatar

Correct answer by
Employee

can't you do ${list}?

Avatar

Level 3

Thanks guys

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