Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A842551A for ; Tue, 3 Jul 2012 08:39:13 +0000 (UTC) Received: (qmail 50622 invoked by uid 500); 3 Jul 2012 08:39:13 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 50458 invoked by uid 500); 3 Jul 2012 08:39:12 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 50414 invoked by uid 99); 3 Jul 2012 08:39:11 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jul 2012 08:39:11 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id A293014284F for ; Tue, 3 Jul 2012 08:39:10 +0000 (UTC) Date: Tue, 3 Jul 2012 08:39:10 +0000 (UTC) From: "Albert Attard (JIRA)" To: dev@hc.apache.org Message-ID: <2023824292.78.1341304750669.JavaMail.jiratomcat@issues-vm> In-Reply-To: <492919327.798.1341248602621.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (HTTPCLIENT-1211) SSLSocketFactory constructor throwing java.lang.IllegalStateException: SSLContextImpl is not initialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HTTPCLIENT-1211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13405690#comment-13405690 ] Albert Attard commented on HTTPCLIENT-1211: ------------------------------------------- Thank you for your feedback. The above example works. Where and who do I need to notify so that the example in section 2.6. Protocol schemes (at: http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html) is updated? Albert > SSLSocketFactory constructor throwing java.lang.IllegalStateException: SSLContextImpl is not initialized > -------------------------------------------------------------------------------------------------------- > > Key: HTTPCLIENT-1211 > URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1211 > Project: HttpComponents HttpClient > Issue Type: Bug > Components: Documentation > Affects Versions: 4.1.3 > Environment: Java SE 1.7 > com.springsource.org.apache.httpcomponents.httpclient;version=4.1.1 > com.springsource.org.apache.httpcomponents.httpcore;version=4.1.0 > com.springsource.org.apache.commons.net;version=2.0.0 > Reporter: Albert Attard > Priority: Minor > Fix For: 4.2.2 > > > The example illustrated in section 2.6. Protocol schemes (at: http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html) fails to run with an {{IllegalArgumentException}}. > {code:java} > import org.apache.http.conn.scheme.Scheme; > import javax.net.ssl.SSLContext; > import org.apache.http.conn.ssl.SSLSocketFactory; > import org.apache.http.conn.scheme.Scheme; > import org.apache.http.conn.scheme.SchemeRegistry; > ... > SSLSocketFactory sf = new SSLSocketFactory( > SSLContext.getInstance("TLS"), > SSLSocketFactory.STRICT_HOSTNAME_VERIFIER); > Scheme https = new Scheme("https", 443, sf); > {code} > The above fragment throws the following exception when executed > {code} > java.lang.IllegalStateException: SSLContextImpl is not initialized > at sun.security.ssl.SSLContextImpl.engineGetSocketFactory(SSLContextImpl.java:182) > at javax.net.ssl.SSLContext.getSocketFactory(SSLContext.java:295) > at org.apache.http.conn.ssl.SSLSocketFactory.(SSLSocketFactory.java:327) > at test.com.project.net.internal.http.apache.TestSSL.test3(TestSSL.java:95) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) > at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) > at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) > at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) > at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) > at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) > at org.junit.runners.ParentRunner.run(ParentRunner.java:300) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) > {code} > Am I missing something? > Albert -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org For additional commands, e-mail: dev-help@hc.apache.org