#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing


    HI
    I am using a java webstart(which will be loaded by a servlet running on a server) and trying to select a file from the desktop and upload to remote ftp location.
    During this upload i need to call a servlet for getting some details from the server, for this i use the HTTPClient class to invoke the server and This works fine with http protocol.
    But if the server is running on https then the below exception is raised when the HTTPclient.execute method is called.
    java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)

    Further more in a drill down exeption it shows
    ... 15 more
    Caused by: java.io.EOFException
    at java.io.DataInputStream.readInt(Unknown Source)
    at sun.security.provider.JavaKeyStore.engineLoad(Unknown Source)
    at sun.security.provider.JavaKeyStore$JKS.engineLoad(Unknown Source)
    at java.security.KeyStore.load(Unknown Source)
    at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(Unknown Source)
    at sun.security.ssl.SSLContextImpl$DefaultSSLContext.getDefaultTrustManager(Unknown Source)

    i searched on forums buit could nto get any useful information
    Please help with any solution or suggestion.

    Thanks
    Vijay Sunder
  2. #2
  3. Daniel Schildsky
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2004
    Location
    KL, Malaysia.
    Posts
    1,554
    Rep Power
    1621

    HTTPS may need special handling


    As far as I know, HTTPS communications handling is slightly different from conventional HTTP communications handling. Hence, if your application is to establish connectivity via HTTPS, you would have to somehow handle the handshaking using the correct way for HTTPS.

    You may refer to the following article for establishing connectivity via HTTPS: Use HTTPS in your Java client code
    When the programming world turns decent, the real world will turn upside down.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    Hi tvc3mye

    Thanks for your reply, i was also checking on the same lines and found that the handshaking process for the https is getting completed and an error is being raised and so the hand shaking certificate is not generated.

    I modified my code a little so that the hand shaking process happens properly and it worked.

    Thanks
    Vijay Sunder

IMN logo majestic logo threadwatch logo seochat tools logo