org.apache.http.ssl.SSLInitializationException: TLS SSLContext not available


Samebug tips6

TLS v1.2 wasn't implemented until java 7. Try upgrading your Java version or if you're stuck in java 5 or 6 and REALLY need to use TLS v1.2 try using BouncyCastle: https://goo.gl/Tg3jd0


8 months ago
Expert tip

This might also be because you're not initializing java the right way. Try to initialize with -server, and that might turn TLSv1.2 on!


8 months ago
Expert tip

Solutions on the web2

Solution icon of stackoverflow
TLS SSLContext not available

Solution icon of stackoverflow
class configured for SSLContext: sun.security.ssl.SSLContextImpl$TLSContext not a SSLContext

Stack trace

org.apache.http.ssl.SSLInitializationException: TLS SSLContext not available
	at org.apache.http.ssl.SSLContexts.createDefault(SSLContexts.java:58)
	at org.apache.http.impl.client.HttpClientBuilder.build(HttpClientBuilder.java:966)
	at org.apache.http.impl.client.HttpClients.createDefault(HttpClients.java:58)
	at yan.javatips.closure.HttpTest2.main(HttpTest2.java:26)
Caused by: java.security.NoSuchAlgorithmException: TLS SSLContext not available
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
	at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
	at org.apache.http.ssl.SSLContexts.createDefault(SSLContexts.java:54)
	... 3 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
28 more bugmates