I am getting below mentioned error. I copied mail.jar, activation.jar, mailapi.jar, common-lang3.jar to /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext
java.lang.NoClassDefFoundError: javax/activation/DataHandler
at org.apache.commons.mail.Email.createMimeMessage(Email.java:1832)
at org.apache.commons.mail.Email.buildMimeMessage(Email.java:1268)
at org.apache.commons.mail.Email.send(Email.java:1436)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at RJavaTools.invokeMethod(RJavaTools.java:386)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 8 more
NULL
Error: NoClassDefFoundError (Java): javax/activation/DataHandler
One of the comments in the link Vince Fulco provided works in Ubuntu 18.04: https://github.com/rpremraj/mailR/issues/77#issuecomment-465741847
Specifically:
Download the following .jar files:
Find out the java-mailR folder: system.file("java", package = "mailR")
Copy the two .jar files into that folder
Just in case, I rebooted the computer before trying it.
This a well discussed and so far unresolved issue on github. https://github.com/rpremraj/mailR/issues/77
Check your authentication credentials for SMTP. This error comes as a result of failure of authentication details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With