Project

General

Profile

Actions

bug #9931

closed

Handle MailSendException in LoginPresenter and report accordingly

Added by Andreas Kohlbecker about 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
New
Category:
cdm-vaadin
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

Hallo,

Wenn ich auf localhost versuche mich zu registrieren bekomme ich wie erwartet einen Fehler. Allerdings wird der Fehler nicht abgefangen, sondern es kommt nur der Stacktrace. Vielleicht könnte man den noch abfangen.

Viele Grüße
Andreas M.

Jan 26, 2022 4:27:43 PM com.vaadin.server.DefaultErrorHandler doDefault

SCHWERWIEGEND:
java.lang.RuntimeException: A checked exception occurred while invoking listener method onPasswordRevoveryEvent
   ...
Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;

  nested exception is:

      java.net.ConnectException: Connection refused: connect

      at java.util.concurrent.FutureTask.report(FutureTask.java:122)

      at java.util.concurrent.FutureTask.get(FutureTask.java:192)

      at eu.etaxonomy.cdm.vaadin.view.LoginPresenter.requestAccountCreation(LoginPresenter.java:268)

      at eu.etaxonomy.cdm.vaadin.view.LoginPresenter.onPasswordRevoveryEvent(LoginPresenter.java:175)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.vaadin.spring.events.internal.MethodListenerWrapper.publish(MethodListenerWrapper.java:78)

      ... 91 more

Caused by: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;

  nested exception is:

      java.net.ConnectException: Connection refused: connect. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;

  nested exception is:

      java.net.ConnectException: Connection refused: connect; message exceptions (1) are:

Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;

  nested exception is:

      java.net.ConnectException: Connection refused: connect

      at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:433)

      at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:308)

      at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:297)

      at eu.etaxonomy.cdm.api.service.security.AccountSelfManagementService.sendEmail(AccountSelfManagementService.java:104)

      at eu.etaxonomy.cdm.api.service.security.AccountRegistrationService.emailAccountRegistrationRequest(AccountRegistrationService.java:69)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:283)

      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

      at org.springframework.aop.interceptor.AsyncExecutionInterceptor$1.call(AsyncExecutionInterceptor.java:115)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      ... 1 more

Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;

Actions

Also available in: Atom PDF