You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2016/08/13 19:43:22 UTC

[jira] [Resolved] (HTTPCLIENT-1758) HttpClients.createDefault() causing exception on my linux server

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1758.
-------------------------------------------
    Resolution: Invalid

This is not a bug in HttpClient. The default configuration of HttpClient expects the JRE to support TLS.

Oleg 

> HttpClients.createDefault() causing exception on my linux server
> ----------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1758
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1758
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.5.2
>         Environment:  Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-86-generic i686)
>            Reporter: wenburgyan
>
> i write a java program which used the apache httpclient, the program run well on my windows, however error occured on my linux sever. The following is the exception.
> Exception in thread "main" 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)
> the exception code is below
> CloseableHttpClient httpclient = HttpClients.createDefault();
> this is only occured in my remote linux server, running on my local windows no error.
> httpclient 4.5.2
> jdk version 1.8.0_101



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org