Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-71335

Could not send email after upgrade. groovy.lang.MissingMethodException: No signature of method

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Minor Minor
    • email-ext-plugin
    • None
    • Jenkins 2.405, Email Extension Plugin Version 2.97

      The following error occurs at post-processing my freestyle build. Please advice.

      Email was triggered for: Always
      Sending email for trigger: Always
      groovy.lang.MissingMethodException: No signature of method: jakarta.mail.internet.MimeMessage.getRecipients() is applicable for argument types: (javax.mail.Message$RecipientType) values: [To]
      Possible solutions: getRecipients(jakarta.mail.Message$RecipientType), getRecipients(jakarta.mail.Message$RecipientType), setRecipients(jakarta.mail.Message$RecipientType, [Ljakarta.mail.Address, setRecipients(jakarta.mail.Message$RecipientType, [Ljakarta.mail.Address, setRecipients(jakarta.mail.Message$RecipientType, java.lang.String), getAllRecipients()
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:71)
      at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:48)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
      at Script1.run(Script1.groovy:1)
      at hudson.plugins.emailext.ExtendedEmailPublisher.executeScript(ExtendedEmailPublisher.java:728)
      at hudson.plugins.emailext.ExtendedEmailPublisher.executePresendScript(ExtendedEmailPublisher.java:677)
      at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:527)
      at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:484)
      at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:385)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:189)
      at hudson.model.Run.execute(Run.java:1947)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
      at hudson.model.ResourceController.execute(ResourceController.java:101)
      at hudson.model.Executor.run(Executor.java:442)

          [JENKINS-71335] Could not send email after upgrade. groovy.lang.MissingMethodException: No signature of method

          Mark Waite added a comment -

          You're much more likely to receive help from others if you provide the details requested in "How to report an issue". Without the exact list of plugins that are installed, the steps you take to see the problem, and any configuration details needed in order to duplicate the problem, you're hoping that others will duplicate the problem with their best guesses of the steps to take.

          I tried to duplicate the problem by installing Jenkins 2.405 with the email-ext plugin 2.97 and the following additional items that were included:

          Jenkins: 2.405
          OS: Linux - 6.1.0-9-amd64
          Java: 11.0.19 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
          ---
          bootstrap5-api:5.2.2-4
          bouncycastle-api:2.28
          caffeine-api:3.1.6-115.vb_8b_b_328e59d8
          checks-api:2.0.0
          commons-lang3-api:3.12.0-36.vd97de6465d5b_
          commons-text-api:1.10.0-36.vc008c8fcda_7b_
          credentials:1254.vb_96f366e7b_a_d
          display-url-api:2.3.7
          echarts-api:5.4.0-4
          email-ext:2.97
          font-awesome-api:6.3.0-2
          instance-identity:142.v04572ca_5b_265
          ionicons-api:56.v1b_1c8c49374e
          jackson2-api:2.15.1-344.v6eb_55303dc3e
          jakarta-activation-api:2.0.1-3
          jakarta-mail-api:2.0.1-3
          javax-activation-api:1.2.0-6
          javax-mail-api:1.6.2-9
          jaxb:2.3.8-1
          jquery3-api:3.7.0-1
          junit:1202.v79a_986785076
          mailer:448.v5b_97805e3767
          matrix-project:789.v57a_725b_63c79
          plugin-util-api:3.2.1
          popper2-api:2.11.6-2
          scm-api:672.v64378a_b_20c60
          script-security:1244.ve463715a_f89c
          snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4
          structs:324.va_f5d6774f3a_d
          token-macro:359.vb_cde11682e0c
          workflow-api:1213.v646def1087f9
          workflow-step-api:639.v6eca_cd8c04a_a_
          workflow-support:839.v35e2736cfd5c
          

          I created a freestyle project, added an editable email notification, and ran the job. It reported on the console that no email was sent.

          Mark Waite added a comment - You're much more likely to receive help from others if you provide the details requested in "How to report an issue" . Without the exact list of plugins that are installed, the steps you take to see the problem, and any configuration details needed in order to duplicate the problem, you're hoping that others will duplicate the problem with their best guesses of the steps to take. I tried to duplicate the problem by installing Jenkins 2.405 with the email-ext plugin 2.97 and the following additional items that were included: Jenkins: 2.405 OS: Linux - 6.1.0-9-amd64 Java: 11.0.19 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) --- bootstrap5-api:5.2.2-4 bouncycastle-api:2.28 caffeine-api:3.1.6-115.vb_8b_b_328e59d8 checks-api:2.0.0 commons-lang3-api:3.12.0-36.vd97de6465d5b_ commons-text-api:1.10.0-36.vc008c8fcda_7b_ credentials:1254.vb_96f366e7b_a_d display-url-api:2.3.7 echarts-api:5.4.0-4 email-ext:2.97 font-awesome-api:6.3.0-2 instance-identity:142.v04572ca_5b_265 ionicons-api:56.v1b_1c8c49374e jackson2-api:2.15.1-344.v6eb_55303dc3e jakarta-activation-api:2.0.1-3 jakarta-mail-api:2.0.1-3 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.8-1 jquery3-api:3.7.0-1 junit:1202.v79a_986785076 mailer:448.v5b_97805e3767 matrix-project:789.v57a_725b_63c79 plugin-util-api:3.2.1 popper2-api:2.11.6-2 scm-api:672.v64378a_b_20c60 script-security:1244.ve463715a_f89c snakeyaml-api:1.33-95.va_b_a_e3e47b_fa_4 structs:324.va_f5d6774f3a_d token-macro:359.vb_cde11682e0c workflow-api:1213.v646def1087f9 workflow-step-api:639.v6eca_cd8c04a_a_ workflow-support:839.v35e2736cfd5c I created a freestyle project, added an editable email notification, and ran the job. It reported on the console that no email was sent.

          John Philip added a comment -

          Had the following in the presend script. The error went away after this was removed.

          msg.setRecipients(javax.mail.Message.RecipientType.TO, filtered as javax.mail.Address[])

          John Philip added a comment - Had the following in the presend script. The error went away after this was removed. msg.setRecipients(javax.mail.Message.RecipientType.TO, filtered as javax.mail.Address[])

            Unassigned Unassigned
            jps123 John Philip
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: