Ticket #19580

Cannot use https: protocol

Open Date: 2009-11-16 14:31 Last Update: 2010-03-06 00:00

Reporter:
Owner:
Type:
Status:
Closed
Component:
MileStone:
Priority:
5 - Medium
Severity:
5 - Medium
Resolution:
Fixed
File:
None

Details

NoSuchAlgorythmException occurred.

import java.io.*;
import java.net.*;

public class SSLTest
{
  public static void main(String[] args) throws Exception
  {
    URL url = new URL("https://sourceforge.jp/");
    URLConnection uc = url.openConnection();
    InputStream ins = uc.getInputStream();
    byte[] buff = new byte[16 * 1024];
    while (ins.read(buff) != -1)
      {
        
      }
    ins.close();
  }
}

Ticket History (3/5 Histories)

2009-11-16 14:31 Updated by: freebeans
  • New Ticket "Cannot use https: protocol" created
2009-11-16 14:32 Updated by: freebeans
Comment
jre/lib/java.security does not included security provider class names.
It should be:
security.provider.1=gnu.java.security.provider.Gnu
security.provider.2=gnu.javax.crypto.jce.GnuCrypto
security.provider.3=gnu.javax.crypto.jce.GnuSasl
security.provider.4=gnu.javax.net.ssl.provider.Jessie
security.provider.5=gnu.javax.security.auth.callback.GnuCallbacks

2009-12-02 22:27 Updated by: freebeans
Comment

Following exception occurred:

java.lang.RuntimeException: java.lang.RuntimeException: error instantiating default socket factory: java.security.KeyManagementException: java.security.KeyStoreException: java.io.FileNotFoundException: \Program Files\Mysaifu JVM\jre\lib\security\cacerts
   at javax.net.ssl.SSLSocketFactory$ErrorSocketFactory.createSocket(SSLSocketFactory.java:214)
   at gnu.java.net.protocol.http.HTTPConnection.getSocket(HTTPConnection.java:730)
   at gnu.java.net.protocol.http.HTTPConnection.getOutputStream(HTTPConnection.java:800)
   at gnu.java.net.protocol.http.Request.dispatch(Request.java:291)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect(HTTPURLConnection.java:219)
   at gnu.java.net.protocol.http.HTTPURLConnection.getInputStream(HTTPURLConnection.java:488)
   at SSLTest.main(SSLTest.java:10)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:368)
   at java.lang.VMMainThread$1.run(VMMainThread.java:125)
   at java.lang.VMThread.run(VMThread.java:121)
Caused by: java.lang.RuntimeException: error instantiating default socket factory: java.security.KeyManagementException: java.security.KeyStoreException: java.io.FileNotFoundException: \Program Files\Mysaifu JVM\jre\lib\security\cacerts
   at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:145)
   at javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(HttpsURLConnection.java:159)
   at javax.net.ssl.HttpsURLConnection.getSSLSocketFactory(HttpsURLConnection.java:232)
   at gnu.java.net.protocol.http.HTTPURLConnection.connect(HTTPURLConnection.java:172)
   ...6 more
Caused by: java.security.KeyManagementException: java.security.KeyStoreException: java.io.FileNotFoundException: \Program Files\Mysaifu JVM\jre\lib\security\cacerts
   at gnu.javax.net.ssl.provider.SSLContextImpl.defaultTrustManager(SSLContextImpl.java:283)
   at gnu.javax.net.ssl.provider.SSLContextImpl.engineInit(SSLContextImpl.java:202)

   at javax.net.ssl.SSLContext.init(SSLContext.java:291)
   at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:141)
   ...9 more
Caused by: java.security.KeyStoreException: java.io.FileNotFoundException: \Program Files\Mysaifu JVM\jre\lib\security\cacerts
   at gnu.javax.net.ssl.provider.X509TrustManagerFactory.engineInit(X509TrustManagerFactory.java:173)
   at javax.net.ssl.TrustManagerFactory.init(TrustManagerFactory.java:285)
   at gnu.javax.net.ssl.provider.SSLContextImpl.defaultTrustManager(SSLContextImpl.java:270)
   ...12 more
Caused by: java.io.FileNotFoundException: \Program Files\Mysaifu JVM\jre\lib\security\cacerts
   at java.io.FileInputStream.<init>(FileInputStream.java:121)
   at java.io.FileInputStream.<init>(FileInputStream.java:85)
   at gnu.javax.net.ssl.provider.X509TrustManagerFactory.engineInit(X509TrustManagerFactory.java:161)
   ...14 more
Caused by: java.io.IOException: 指定したファイルが見つかりません。

   at gnu.java.nio.VMChannel.open(Native Method)
   at gnu.java.nio.VMChannel.openFile(VMChannel.java:558)
   at gnu.java.nio.FileChannelImpl.<init>(FileChannelImpl.java:152)
   at gnu.java.nio.FileChannelImpl.create(FileChannelImpl.java:141)
   at java.io.FileInputStream.<init>(FileInputStream.java:113)
   ...16 more
JVM exit

2009-12-26 22:52 Updated by: freebeans
  • Resolution Update from None to Fixed
  • Milestone Update from (None) to jvm0.4.8
2010-03-06 00:00 Updated by: freebeans
  • Status Update from Open to Closed
  • Ticket Close date is changed to 2010-03-06 00:00

Attachment File List

No attachments

Edit

Please login to add comment to this ticket » Login