java.lang.NoSuchMethodError: com.sun.mail.util.TraceInputStream.<init>(Ljava/io/InputStream;Lcom/sun/mail/util/MailLogger;)V 2020-11-05 16:33:49.859 [task-7] ERROR o.s.a.i.SimpleAsyncUncaughtExceptionHandler - Unexpected exception occurred invoking async method: public void com.xjr.kit.email.EMailUtils.sendHtmlMail(com.xjr.kit.email.EmailProperties) java.lang.NoSuchMethodError: com.sun.mail.util.TraceInputStream.<init>(Ljava/io/InputStream;Lcom/sun/mail/util/MailLogger;)V at com.sun.mail.smtp.SMTPTransport.initStreams(SMTPTransport.java:2281) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2169) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:722) at javax.mail.Service.connect(Service.java:291) at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(JavaMailSenderImpl.java:518) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:437) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:361) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:356) at com.xjr.kit.email.EMailUtils.sendHtmlMail(EMailUtils.java:88) at com.xjr.kit.email.EMailUtils$$FastClassBySpringCGLIB$$2bc1755a.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:750) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)