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

Fatal exception when sending mail : java.lang.ClassCastException: gnu.mail.handler.TextPlain

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • mailer-plugin
    • None
    • Platform: All, OS: All

      When a build finishes, hudson fails to send a mail with the result of the build.
      This behaviour is new to version 1.180 (it worked with version 1.179).

      We get the following trace (note there is a valid e-mail and an invalid one,
      that's maybe the cause):

      Sending e-mails to: valid@email.Com ipad7251orange-ftgroup.com
      FATAL: gnu.mail.handler.TextPlain
      java.lang.ClassCastException: gnu.mail.handler.TextPlain
      at
      javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:596)
      at
      javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:550)
      at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:611)
      at javax.activation.DataHandler.writeTo(DataHandler.java:315)
      at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:248)
      at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1268)
      at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012)
      at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980)
      at javax.mail.Transport.send(Transport.java:97)
      at hudson.tasks.MailSender.execute(MailSender.java:74)
      at hudson.tasks.Mailer._perform(Mailer.java:75)
      at hudson.tasks.Mailer.perform(Mailer.java:69)
      at
      hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:33)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:273)
      at
      hudson.model.AbstractBuild$AbstractRunner.performAllBuildStep(AbstractBuild.java:261)
      at hudson.model.Build$RunnerImpl.post2(Build.java:136)
      at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:246)
      at hudson.model.Run.run(Run.java:677)
      at hudson.model.Build.run(Build.java:101)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:65)

      Thanks.

            Unassigned Unassigned
            julienw julienw
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: