简体   繁体   中英

Error in sending mail using Email-Ext plugin jenkins

My jenkins version is Jenkins ver. 1.642.4 & Token Macro version is 1.12. When I try to set-up Email-ext plugin, mail sending fails due to the below following error.

ERROR: Step ‘Editable Email Notification’ aborted due to exception: 
java.lang.NoSuchMethodError: org.jenkinsci.plugins.tokenmacro.TokenMacro.expandAll(Lhudson/model/Run;Lhudson/FilePath;Lhudson/model/TaskListener;Ljava/lang/String;ZLjava/util/List;)Ljava/lang/String;
    at hudson.plugins.emailext.plugins.ContentBuilder.transformText(ContentBuilder.java:80)
    at hudson.plugins.emailext.ExtendedEmailPublisher.setSubject(ExtendedEmailPublisher.java:706)
    at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:595)

Can someone please let me know how to fix the error ?

When installing latest Email Extension Plugin (2.57.1) in Jenkins LTS 1.625.3, its dependency Token Macro Plugin is installed in version 1.12.1.

But Email Extension version 2.57.1 requires Token Macro in version 2.0 and fails. As Token Macro is used by a large set of plugins, I decided to keep 1.12.1.

As a result, I manually installed Email Extension 2.47 (august 2016 before pipeline support and Jenkins 2) which works well with Token Macro 1.12.1, with hope to not impact any other plugins. Do to so, hpi file has to be uploaded manually in Jenkins Update Center "Advanced" section.

This occurred due to incompatibility of the Email-Ext plugin with FindBugs version 1.6. This got fixed after updating to Jenkins 2.19 LTS

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM