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

[native-image] SSLContext reflective instantation fails #390

lbialy opened this Issue May 1, 2018 · 4 comments


3 participants

lbialy commented May 1, 2018

Hello again, I've found another problem with native-image tool related to reflection I guess. When I compile http4s-blaze-client package with native-image I get: class configured for SSLContext (provider: SunJSSE) cannot be found.
        at java.lang.Throwable.<init>(
        at java.lang.Exception.<init>(
        at org.http4s.client.blaze.Http1Support.$anonfun$sslContext$1(Http1Support.scala:32)
        at org.http4s.client.blaze.Http1Support$$Lambda$12206/202650241.apply(Unknown Source)
        at scala.Option.getOrElse(Option.scala:121)
        at org.http4s.client.blaze.Http1Support.<init>(Http1Support.scala:32)
        at org.http4s.client.blaze.Http1Support$.apply(Http1Support.scala:23)
        at org.http4s.client.blaze.Http1Client$.mkClient(Http1Client.scala:24)
        at org.http4s.client.blaze.Http1Client$.$anonfun$apply$1(Http1Client.scala:17)

Missing class in question is Is providing a shim the only way to work around this class of problems?


This comment has been minimized.


cstancu commented May 1, 2018

@lbialy support for the Java security packages is currently under development. There is no workaround for it at this point.

@cstancu cstancu added the substrate label May 1, 2018


This comment has been minimized.

lbialy commented May 3, 2018

Workaround that works if you don't actually use https:

  class DummySSLContext(spi: SSLContextSpi, provider: Provider, s: String) extends SSLContext(spi, provider, s) {

  private def sslContext: SSLContext = new DummySSLContext(null, null, null)

This comment has been minimized.

danielnorberg commented May 23, 2018

Really looking forward to compiling our cli with native-image when ssl/https support lands. Any updates on when it might be implemented or any pointers on how to contribute to make this work?

@cstancu cstancu added the feature label Jun 22, 2018

@maizy maizy referenced this issue Jul 8, 2018


AWS S3 SDK support #5

6 of 9 tasks complete

This comment has been minimized.


cstancu commented Sep 18, 2018

This should be fixed in 76d0435 which adds support for HTTPS and JCA security services. You need to run native-image with --enable-https or --enable-url-protocols=https. These features will be available in the rc7 realease. See and for details.

@cstancu cstancu closed this Sep 18, 2018

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