Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5400

Executable model build fails with SerialVersionUID and key annotations

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 7.38.0.Final
    • Fix Version/s: None
    • Component/s: core engine
    • Labels:
      None
    • Sprint:
      2020 Week 22-24 (from May 25)
    • Steps to Reproduce:
      Hide

      run:

      mvn clean test
      

      on attached reproducer.

      Show
      run: mvn clean test on attached reproducer.
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      Executable model compilation fails on declared types with both @SerialVersionUID and @key annotations.

      Example of DRL that fails to compile:

          declare ServiceInformation
              @serialVersionUID( 0 )
              code: String @key
          end
          rule "create new ServiceInformation"
          when
          then
             insert( new ServiceInformation("123456") );
          end
      

      Error:

          Error Messages:
          Message [id=1, kieBase=binding-field-indexed-with-square-brackets, level=ERROR, path=null, line=56, column=0
             text=Duplicate method ServiceInformation(String) in type ServiceInformation]
          Message [id=2, kieBase=binding-field-indexed-with-square-brackets, level=ERROR, path=null, line=61, column=0
             text=Duplicate method ServiceInformation(String) in type ServiceInformation]
      

      The example works fine when compiling without executable model.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                mcasalino Matteo Casalino
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: