Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Nifi PutEmail, throwing out exception?

avatar
Rising Star

Hi,

I have configured PutEmail to mailtrap.io.

the putEmail configuration

murali2425_0-1614828937427.png

 

The exception :

2021-03-04 03:08:56,560 ERROR [Timer-Driven Process Thread-9] o.a.nifi.processors.standard.PutEmail PutEmail[id=5744df4c-7f6d-3fdb-3243-eb175358dd83] PutEmail[id=5744df4c-7f6d-3fdb-3243-eb175358dd83] failed to process session due to java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport; Processor Administratively Yielded for 1 sec: java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:179)
at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:85)
at javax.activation.DataHandler.getCommandMap(DataHandler.java:167)
at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:629)
at javax.activation.DataHandler.writeTo(DataHandler.java:329)
at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:340)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1575)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2271)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2231)
at javax.mail.Transport.send(Transport.java:123)
at org.apache.nifi.processors.standard.PutEmail.send(PutEmail.java:541)
at org.apache.nifi.processors.standard.PutEmail.onTrigger(PutEmail.java:395)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1174)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:213)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.sun.activation.registries.LogSupport
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

 

I know LogSupport classes is missing tried using LogSupport classes , javax.mail and activation-1.0.2, but not finding the  LogSupport classes.

 

Any idea what could be solution.

 

Thanks

--Murali

 

3 REPLIES 3

avatar
New Contributor

Hi @murali2425, Were you able to find a solution/workaround to this problem? I am experiencing the same error on the PutEmail processor and can't seem to find a solution. 

avatar
New Contributor

Hi @murali2425 and @cgag,

probably late but this helped in my case:

<nifi-folder>/lib/java11

try replace

javax.activation-api-1.2.0.jar

with

javax.activation-1.2.0.jar 

 

avatar
New Contributor

Thank you so much. That was also the case with my NiFi instance. The replacement of this .jar package saved me lots of time.