Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17092

NoClassDefFoundError: javax/activation/DataSource on Java 11+

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      If you use XWiki on Java11+ with the default Jetty distribution (which includes Java Mail), you'll get a "NoClassDefFoundError: javax/activation/DataSource" error if you try to use a feature of XWiki that sends a mail:

      11:16:11.618 [tc-okhttp-stream-1150574999] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: Caused by: java.lang.NoClassDefFoundError: javax/activation/DataSource
      11:16:11.618 [tc-okhttp-stream-1150574999] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at com.xpn.xwiki.plugin.mailsender.MailSenderPlugin.createMimeMessage(MailSenderPlugin.java:229)
      ...
      Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
      11:16:11.634 [tc-okhttp-stream-1150574999] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
      11:16:11.634 [tc-okhttp-stream-1150574999] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
      11:16:11.634 [tc-okhttp-stream-1150574999] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      11:16:11.635 [tc-okhttp-stream-1150574999] INFO  o.x.t.d.i.j.s.ServletContainerExecutor - STDOUT: 	... 113 common frames omitted
      

      See https://github.com/appropriate/docker-jetty/issues/108#issuecomment-593914430 for more details.

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              vmassol Vincent Massol
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: