Duplicate :
|
FULL PRODUCT VERSION : java version "1.6.0_11" Java(TM) SE Runtime Environment (build 1.6.0_11-b03) Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows XP [Version 5.1.2600] A DESCRIPTION OF THE PROBLEM : The code works fine on Update 7 and not 10. I think the issue already exists in Update 10. The following code which was working till 1.6 update 7 fails in update 11. Socket mySocket=null; HttpsURLConnection conn; // try{ //String fxRatesUrl = "https://"+host+SocketAlternateAddress+"?keytol="+key; String fxRatesUrl = "https://www.comforexplus-demo.com/080525/flash/Commerzbank/CustomerSite/index.html?streamingMode=2"; //InetAddress address = InetAddress.getByName(host); URL myurl = new URL(fxRatesUrl); //URL myurl = new URL("https://www.fxmng.com/?keytol="+key); //HttpsURLConnection.setDefaultSSLSocketFactory((SSLSocketFactory)blindFactory.getDefault()); conn = (HttpsURLConnection)myurl.openConnection(); conn.setSSLSocketFactory((SSLSocketFactory)blindFactory.getDefault());// fxmFactory); conn.setHostnameVerifier(new MyVerified()); conn.connect(); mySocket = fxmFactory.getSocket(); return mySocket; We use the Blind SSL factory as described here: http://blog.platinumsolutions.com/node/79 We are running the code snippet and we fail when we get to the Connect method of the HttpsUrlConnection. The error we are getting is : "unconnected socket not implemented" This only started happening with Update 11 STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Socket mySocket=null; HttpsURLConnection conn; // try{ //String fxRatesUrl = "https://"+host+SocketAlternateAddress+"?keytol="+key; String fxRatesUrl = "https://www.comforexplus-demo.com/080525/flash/Commerzbank/CustomerSite/index.html?streamingMode=2"; //InetAddress address = InetAddress.getByName(host); URL myurl = new URL(fxRatesUrl); //URL myurl = new URL("https://www.fxmng.com/?keytol="+key); //HttpsURLConnection.setDefaultSSLSocketFactory((SSLSocketFactory)blindFactory.getDefault()); conn = (HttpsURLConnection)myurl.openConnection(); conn.setSSLSocketFactory((SSLSocketFactory)blindFactory.getDefault());// fxmFactory); conn.setHostnameVerifier(new MyVerified()); conn.connect(); mySocket = fxmFactory.getSocket(); return mySocket; We use the Blind SSL factory as described here: http://blog.platinumsolutions.com/node/79 We are running the code snippet and we fail when we get to the Connect method of the HttpsUrlConnection. The error we are getting is : "unconnected socket not implemented" This only started happening with Update 11 EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The should work in 1.6 update 11 also ACTUAL - Code fails in 1.6 update 11 ERROR MESSAGES/STACK TRACES THAT OCCUR : The error we are getting is : "unconnected socket not implemented" REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- Socket mySocket=null; HttpsURLConnection conn; // try{ //String fxRatesUrl = "https://"+host+SocketAlternateAddress+"?keytol="+key; String fxRatesUrl = "https://www.comforexplus-demo.com/080525/flash/Commerzbank/CustomerSite/index.html?streamingMode=2"; //InetAddress address = InetAddress.getByName(host); URL myurl = new URL(fxRatesUrl); //URL myurl = new URL("https://www.fxmng.com/?keytol="+key); //HttpsURLConnection.setDefaultSSLSocketFactory((SSLSocketFactory)blindFactory.getDefault()); conn = (HttpsURLConnection)myurl.openConnection(); conn.setSSLSocketFactory((SSLSocketFactory)blindFactory.getDefault());// fxmFactory); conn.setHostnameVerifier(new MyVerified()); conn.connect(); mySocket = fxmFactory.getSocket(); return mySocket; ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Not Available Release Regression From : 6u7 The above release value was the last known release where this bug was not reproducible. Since then there has been a regression.