You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In native mode sending an email throw an exception and email is not sent.
Expected behavior curl http://localhost:8080/simple should send a mail.
Actual behavior
An exception is thrown.
2019-07-14 18:31:24,598 INFO [io.quarkus] (main) Quarkus 0.19.1 started in 0.016s. Listening on: http://[::]:8080
2019-07-14 18:31:24,598 INFO [io.quarkus] (main) Installed features: [cdi, mailer, resteasy, vertx]
2019-07-14 18:31:28,720 SEVERE [io.ver.cor.imp.ContextImpl] (vert.x-eventloop-thread-0) Unhandled exception: io.vertx.core.VertxException: javax.net.ssl.SSLException: failed to initialize the client-side SSL context
at io.vertx.core.net.impl.SSLHelper.createContext(SSLHelper.java:318)
at io.vertx.core.net.impl.SSLHelper.getContext(SSLHelper.java:493)
at io.vertx.core.net.impl.SSLHelper.validate(SSLHelper.java:518)
at io.vertx.core.net.impl.NetClientImpl.doConnect(NetClientImpl.java:176)
at io.vertx.core.net.impl.NetClientImpl.doConnect(NetClientImpl.java:168)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:116)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:110)
at io.vertx.ext.mail.impl.SMTPConnection.openConnection(SMTPConnection.java:179)
at io.vertx.ext.mail.impl.SMTPStarter.start(SMTPStarter.java:49)
at io.vertx.ext.mail.impl.SMTPConnectionPool.createConnection(SMTPConnectionPool.java:240)
at io.vertx.ext.mail.impl.SMTPConnectionPool.createNewConnection(SMTPConnectionPool.java:224)
at io.vertx.ext.mail.impl.SMTPConnectionPool.getConnection0(SMTPConnectionPool.java:147)
at io.vertx.ext.mail.impl.SMTPConnectionPool.getConnection(SMTPConnectionPool.java:77)
at io.vertx.ext.mail.impl.MailClientImpl.getConnection(MailClientImpl.java:101)
at io.vertx.ext.mail.impl.MailClientImpl.lambda$sendMail$1(MailClientImpl.java:85)
at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:284)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:495)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:473)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
Caused by: javax.net.ssl.SSLException: failed to initialize the client-side SSL context
at io.netty.handler.ssl.JdkSslClientContext.newSSLContext(JdkSslClientContext.java:305)
at io.netty.handler.ssl.JdkSslClientContext.(JdkSslClientContext.java:270)
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:168)
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:452)
at io.vertx.core.net.impl.SSLHelper.createContext(SSLHelper.java:309)
... 25 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: TLS, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$TLSContext)
at java.security.Provider$Service.newInstance(Provider.java:1621)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at io.netty.handler.ssl.JdkSslClientContext.newSSLContext(JdkSslClientContext.java:287)
... 29 more
Caused by: java.lang.NoSuchMethodException: sun.security.ssl.SSLContextImpl$TLSContext.
at java.lang.Class.getConstructor0(DynamicHub.java:3082)
at java.lang.Class.getConstructor(DynamicHub.java:1825)
at java.security.Provider$Service.newInstance(Provider.java:1594)
... 33 more
@gsmet@cescoffiershould we activate activate ssl for native images when quarkus.mailer.ssl is set to true? Spoke too early, maybe it is not possible since SslNativeConfigBuildItem is a SimpleBuildItem. We could perhaps document that quarkus.ssl.native config option is required and has to be set to true when quarkus.mailer.ssl=true in the mailer guide.
Describe the bug
In
native mode
sending an email throw an exception and email is not sent.Expected behavior
curl http://localhost:8080/simple
should send a mail.Actual behavior
An exception is thrown.
2019-07-14 18:31:24,598 INFO [io.quarkus] (main) Quarkus 0.19.1 started in 0.016s. Listening on: http://[::]:8080
2019-07-14 18:31:24,598 INFO [io.quarkus] (main) Installed features: [cdi, mailer, resteasy, vertx]
2019-07-14 18:31:28,720 SEVERE [io.ver.cor.imp.ContextImpl] (vert.x-eventloop-thread-0) Unhandled exception: io.vertx.core.VertxException: javax.net.ssl.SSLException: failed to initialize the client-side SSL context
at io.vertx.core.net.impl.SSLHelper.createContext(SSLHelper.java:318)
at io.vertx.core.net.impl.SSLHelper.getContext(SSLHelper.java:493)
at io.vertx.core.net.impl.SSLHelper.validate(SSLHelper.java:518)
at io.vertx.core.net.impl.NetClientImpl.doConnect(NetClientImpl.java:176)
at io.vertx.core.net.impl.NetClientImpl.doConnect(NetClientImpl.java:168)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:116)
at io.vertx.core.net.impl.NetClientImpl.connect(NetClientImpl.java:110)
at io.vertx.ext.mail.impl.SMTPConnection.openConnection(SMTPConnection.java:179)
at io.vertx.ext.mail.impl.SMTPStarter.start(SMTPStarter.java:49)
at io.vertx.ext.mail.impl.SMTPConnectionPool.createConnection(SMTPConnectionPool.java:240)
at io.vertx.ext.mail.impl.SMTPConnectionPool.createNewConnection(SMTPConnectionPool.java:224)
at io.vertx.ext.mail.impl.SMTPConnectionPool.getConnection0(SMTPConnectionPool.java:147)
at io.vertx.ext.mail.impl.SMTPConnectionPool.getConnection(SMTPConnectionPool.java:77)
at io.vertx.ext.mail.impl.MailClientImpl.getConnection(MailClientImpl.java:101)
at io.vertx.ext.mail.impl.MailClientImpl.lambda$sendMail$1(MailClientImpl.java:85)
at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:284)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:320)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:495)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:905)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:748)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:473)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:193)
Caused by: javax.net.ssl.SSLException: failed to initialize the client-side SSL context
at io.netty.handler.ssl.JdkSslClientContext.newSSLContext(JdkSslClientContext.java:305)
at io.netty.handler.ssl.JdkSslClientContext.(JdkSslClientContext.java:270)
at io.netty.handler.ssl.SslContext.newClientContextInternal(SslContext.java:168)
at io.netty.handler.ssl.SslContextBuilder.build(SslContextBuilder.java:452)
at io.vertx.core.net.impl.SSLHelper.createContext(SSLHelper.java:309)
... 25 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: TLS, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$TLSContext)
at java.security.Provider$Service.newInstance(Provider.java:1621)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
at io.netty.handler.ssl.JdkSslClientContext.newSSLContext(JdkSslClientContext.java:287)
... 29 more
Caused by: java.lang.NoSuchMethodException: sun.security.ssl.SSLContextImpl$TLSContext.
at java.lang.Class.getConstructor0(DynamicHub.java:3082)
at java.lang.Class.getConstructor(DynamicHub.java:1825)
at java.security.Provider$Service.newInstance(Provider.java:1594)
... 33 more
To Reproduce
Steps to reproduce the behavior:
application.properties
to define thequarkus.mailer.password=
corresponding to the api key used insendgrid
build_native.sh
to your local graalvm pathbuild_native.sh
./target/quarkus-sample-email-app-1.0-SNAPSHOT-runner
curl http://localhost:8080/simple
Configuration
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
: Linux arch-anywhere 5.1.6-arch1-1-ARCH Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP PREEMPT Fri May 31 15:17:53 UTC 2019 x86_64 GNU/Linuxjava -version
: openjdk version "1.8.0_202"Additional context
(Add any other context about the problem here.)
The text was updated successfully, but these errors were encountered: