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

Executable model build fails with SerialVersionUID and key annotations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • None
    • 7.38.0.Final
    • core engine
    • None
    • 2020 Week 22-24 (from May 25)
    • Hide

      run:

      mvn clean test
      

      on attached reproducer.

      Show
      run: mvn clean test on attached reproducer.
    • NEW
    • 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.

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            mcasalino Matteo Casalino (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: