After upgrading to JDK11, the plugin fails with:

       

       09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 
       09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 
       09:38:39 - java.lang.ClassNotFoundException: javax.activation.DataSource
       09:38:39 - at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
       09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
       09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
       09:38:39 - Caused: java.lang.NoClassDefFoundError: javax/activation/DataSource
       09:38:39 - at jenkins.plugins.mailer.tasks.MimeMessageBuilder.buildMimeMessage(MimeMessageBuilder.java:198)
       09:38:39 - at hudson.tasks.MailSender.createEmptyMail(MailSender.java:403)
       09:38:39 - at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:208)
       09:38:39 - at hudson.tasks.MailSender.createMail(MailSender.java:196)
       09:38:39 - at hudson.tasks.MailSender.run(MailSender.java:111)
       09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:175)
       09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:138)
       09:38:39 - at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
       09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
       09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
       09:38:39 - at hudson.model.Build$BuildExecution.post2(Build.java:186)
       09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
       09:38:39 - at hudson.model.Run.execute(Run.java:1843)
       09:38:39 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       09:38:39 - at hudson.model.ResourceController.execute(ResourceController.java:97)
       09:38:39 - at hudson.model.Executor.run(Executor.java:429)

          [JENKINS-59595] plugin failing with JDK11

          Peter River created issue -

          Hi peterriver, thanks for reporting the problem. Could you please tell me which version of the Mailer plugin you have on your instance? (If you have the support-core plugin installed, it would be easier to get a "support bundle" of your instance).

          I'm surprise that the tests are not catching this.

          Adrien Lecharpentier added a comment - Hi peterriver , thanks for reporting the problem. Could you please tell me which version of the Mailer plugin you have on your instance? (If you have the support-core plugin installed, it would be easier to get a "support bundle" of your instance). I'm surprise that the tests are not catching this.
          Ian Williams made changes -
          Description Original: After upgrading to JDK11, the plugin fails with:

           

          09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 09:38:39 - java.lang.ClassNotFoundException: javax.activation.DataSource09:38:39 - at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)09:38:39 - Caused: java.lang.NoClassDefFoundError: javax/activation/DataSource09:38:39 - at jenkins.plugins.mailer.tasks.MimeMessageBuilder.buildMimeMessage(MimeMessageBuilder.java:198)09:38:39 - at hudson.tasks.MailSender.createEmptyMail(MailSender.java:403)09:38:39 - at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:208)09:38:39 - at hudson.tasks.MailSender.createMail(MailSender.java:196)09:38:39 - at hudson.tasks.MailSender.run(MailSender.java:111)09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:175)09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:138)09:38:39 - at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)09:38:39 - at hudson.model.Build$BuildExecution.post2(Build.java:186)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)09:38:39 - at hudson.model.Run.execute(Run.java:1843)09:38:39 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)09:38:39 - at hudson.model.ResourceController.execute(ResourceController.java:97)09:38:39 - at hudson.model.Executor.run(Executor.java:429)
          New: After upgrading to JDK11, the plugin fails with:

           
          {code:java}
          09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 09:38:39 - java.lang.ClassNotFoundException: javax.activation.DataSource09:38:39 - at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)09:38:39 - Caused: java.lang.NoClassDefFoundError: javax/activation/DataSource09:38:39 - at jenkins.plugins.mailer.tasks.MimeMessageBuilder.buildMimeMessage(MimeMessageBuilder.java:198)09:38:39 - at hudson.tasks.MailSender.createEmptyMail(MailSender.java:403)09:38:39 - at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:208)09:38:39 - at hudson.tasks.MailSender.createMail(MailSender.java:196)09:38:39 - at hudson.tasks.MailSender.run(MailSender.java:111)09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:175)09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:138)09:38:39 - at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)09:38:39 - at hudson.model.Build$BuildExecution.post2(Build.java:186)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)09:38:39 - at hudson.model.Run.execute(Run.java:1843)09:38:39 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)09:38:39 - at hudson.model.ResourceController.execute(ResourceController.java:97)09:38:39 - at hudson.model.Executor.run(Executor.java:429){code}
          Ian Williams made changes -
          Description Original: After upgrading to JDK11, the plugin fails with:

           
          {code:java}
          09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception: 09:38:39 - java.lang.ClassNotFoundException: javax.activation.DataSource09:38:39 - at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)09:38:39 - Caused: java.lang.NoClassDefFoundError: javax/activation/DataSource09:38:39 - at jenkins.plugins.mailer.tasks.MimeMessageBuilder.buildMimeMessage(MimeMessageBuilder.java:198)09:38:39 - at hudson.tasks.MailSender.createEmptyMail(MailSender.java:403)09:38:39 - at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:208)09:38:39 - at hudson.tasks.MailSender.createMail(MailSender.java:196)09:38:39 - at hudson.tasks.MailSender.run(MailSender.java:111)09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:175)09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:138)09:38:39 - at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)09:38:39 - at hudson.model.Build$BuildExecution.post2(Build.java:186)09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)09:38:39 - at hudson.model.Run.execute(Run.java:1843)09:38:39 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)09:38:39 - at hudson.model.ResourceController.execute(ResourceController.java:97)09:38:39 - at hudson.model.Executor.run(Executor.java:429){code}
          New: After upgrading to JDK11, the plugin fails with:

           
          {code:java}
           09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception:
           09:38:39 - ERROR: Step ‘E-mail Notification’ aborted due to exception:
           09:38:39 - java.lang.ClassNotFoundException: javax.activation.DataSource
           09:38:39 - at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
           09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
           09:38:39 - at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
           09:38:39 - Caused: java.lang.NoClassDefFoundError: javax/activation/DataSource
           09:38:39 - at jenkins.plugins.mailer.tasks.MimeMessageBuilder.buildMimeMessage(MimeMessageBuilder.java:198)
           09:38:39 - at hudson.tasks.MailSender.createEmptyMail(MailSender.java:403)
           09:38:39 - at hudson.tasks.MailSender.createBackToNormalMail(MailSender.java:208)
           09:38:39 - at hudson.tasks.MailSender.createMail(MailSender.java:196)
           09:38:39 - at hudson.tasks.MailSender.run(MailSender.java:111)
           09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:175)
           09:38:39 - at hudson.tasks.Mailer.perform(Mailer.java:138)
           09:38:39 - at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
           09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
           09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
           09:38:39 - at hudson.model.Build$BuildExecution.post2(Build.java:186)
           09:38:39 - at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
           09:38:39 - at hudson.model.Run.execute(Run.java:1843)
           09:38:39 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
           09:38:39 - at hudson.model.ResourceController.execute(ResourceController.java:97)
           09:38:39 - at hudson.model.Executor.run(Executor.java:429){code}
          Adrien Lecharpentier made changes -
          Labels New: java11

          Peter River added a comment -

          mailer-plugin  1.28 

          Jetty 9.3.15

          Peter River added a comment - mailer-plugin  1.28  Jetty 9.3.15

          Peter River added a comment - - edited

          Maybe... https://www.eclipse.org/jetty/documentation/9.4.x/startup-classpath.html

          System classes such as {{java.lang.String}} are excluded from the webapp priority, and you may not replace them with classes in {{WEB-INF/lib}} or {{WEB-INF/}} classes. Unfortunately the specification does not clearly state what classes are _System_ classes, and it is unclear if all {{javax}} classes should be treated as System classes.
          

          Jetty provides  a javax.annotation class, but not the javax.activation.

          Peter River added a comment - - edited Maybe... https://www.eclipse.org/jetty/documentation/9.4.x/startup-classpath.html System classes such as {{java.lang. String }} are excluded from the webapp priority, and you may not replace them with classes in {{WEB-INF/lib}} or {{WEB-INF/}} classes. Unfortunately the specification does not clearly state what classes are _System_ classes, and it is unclear if all {{javax}} classes should be treated as System classes. Jetty provides  a javax.annotation class, but not the javax.activation.

          Peter River added a comment - - edited

          "fixed"
          download jar https://mvnrepository.com/artifact/com.sun.activation/javax.activation/1.2.0 into

          {jetty.home}/lib/ext
          

          and start jetty with the option --module=ext

          Peter River added a comment - - edited "fixed" download jar https://mvnrepository.com/artifact/com.sun.activation/javax.activation/1.2.0 into {jetty.home}/lib/ext and start jetty with the option --module=ext
          Baptiste Mathus made changes -
          Labels Original: java11 New: java11 triaged
          Basil Crow made changes -
          Labels Original: java11 triaged New: java11 java11-compatibility triaged

            alecharp Adrien Lecharpentier
            peterriver Peter River
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: