What causes the exception "Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String" ?

Solution Unverified - Updated -

Issue

  • While validating rules it throws exception whose root cause seem to be the following one.
Unable to Analyse Expression $bookProprerty.initials == 'T' && !isLoanable($bookProprerty.loanerID, $bookProprerty.authorInitials):
[Error: Comparison operation requires compatible types. Found class java.lang.Character and class java.lang.String]
[Near : {... !isLoanable ....}]
              ^
[Line: 39, Column: 8]

How to fix these sorts of issues in rules?

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content