New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[portal] Exception when sending email during user registration #485

alessandrousseglioviretta opened this Issue Mar 6, 2017 · 2 comments


None yet
3 participants

alessandrousseglioviretta commented Mar 6, 2017

Email sending during user registration results in a java.lang.NoSuchMethodError exception; email is not sent.

Expected Behavior

No exception during email sending via SMTP

Current Behavior

When I click the "REGISTER" button I get a Thank you for registering, you will receive an e-mail confirmation in a few minutes toast, but the email is not sent. The Management API logs show the following exception:

21:32:05.461 [SimpleAsyncTaskExecutor-1] ERROR o.s.a.i.SimpleAsyncUncaughtExceptionHandler - Unexpected error occurred invoking async method 'public void'.
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(
	at com.sun.mail.smtp.SMTPTransport.openServer(
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(
	at javax.mail.Service.connect(
	at org.springframework.mail.javamail.JavaMailSenderImpl.connectTransport(
	at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(
	at org.springframework.mail.javamail.JavaMailSenderImpl.send(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor$

Possible Solution

A smtp-*.jar file might be missing, as suggested here:

Steps to Reproduce (for bugs)

Configure a SMTP server and email in gravitee.yml ( I used a Gmail account) and register a new user by using the portal. Then inspect the Management API logs.

My Environment

The exception gets thrown both when installing the docker demo with: curl -L | bash and running graviteeio-full-1.3.3.

@alessandrousseglioviretta alessandrousseglioviretta changed the title from Exception when sending email during user registration to [portal] Exception when sending email during user registration Mar 6, 2017

@brasseld brasseld added the type: bug label Mar 7, 2017

@brasseld brasseld self-assigned this Mar 7, 2017

@brasseld brasseld added this to the 1.4.0 milestone Mar 7, 2017


This comment has been minimized.


NicolasGeraud commented Mar 7, 2017

The jar mail-1.4.7.jar is in the lib/ext and contains this method :

public class TraceInputStream extends FilterInputStream {
    public TraceInputStream(InputStream in, MailLogger logger) {

so a missing jar does not seem to be the root of the problem.


This comment has been minimized.

alessandrousseglioviretta commented Mar 7, 2017

@NicolasGeraud I confirm that the issue is not a missing jar. I added smtp-1.5.6.jar to lib/ext to no avail.

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Mar 7, 2017

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Mar 7, 2017

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Mar 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment