Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2843

When I use a global where the name is the same as its type in the LHS of a .drl Rule, i got an IllegalArgumentException: object is not an instance of declaring class

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 5.1.1.FINAL
    • drools-core
    • None
    • Hide

      See description above.

      Show
      See description above.
    • Workaround Exists
    • Hide

      Workaround 1. Don't have globals where the fact-name is identical to its type. For the above example this means renaming MyGlobalVariable to myGlobalVariable.
      Workaround 2. Put the condition from LHS to RHS. Then the error message goes away.

      Show
      Workaround 1. Don't have globals where the fact-name is identical to its type. For the above example this means renaming MyGlobalVariable to myGlobalVariable. Workaround 2. Put the condition from LHS to RHS. Then the error message goes away.

      I got a global variable "MyGlobalVariable" and called it "MyGlobalVariable". When the rule gets evaluated, i got the above error message.
      I think this is pretty much the same issue as

      https://issues.jboss.org/browse/GUVNOR-171

      The difference is, that my error is in combination with the LHS of a drl.

            mproctor@redhat.com Mark Proctor
            h3rmanns Dirk Hermanns (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Archived: