java.lang.NoClassDefFoundError: sun/security/ssl/SSLSocketImpl

Sonatype JIRA | Martin Kutter | 5 months ago
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Description The fix for [NEXUS-6838] introduced a hard dependency on JREs with alternative JSSE implementations like the IBM JRE do not ship this class. This dependency leads to a NoClassDefFoundError on attempts to configure a proxy repository with a HTTPS URL, and thus renders the proxy repository feature unusable for https URLs *on non-Oracle JVMs*. Symptoms # Browsing remote for proxy repositories with https remote does not work # Logfile shows {noformat} SEVERE: Unhandled exception or error intercepted java.lang.NoClassDefFoundError: sun/security/ssl/SSLSocketImpl at at org.apache.http.impl.conn.HttpClientConnectionOperator.connect( at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect( at org.apache.http.impl.execchain.MainClientExec.establishRoute( at org.apache.http.impl.execchain.MainClientExec.execute( at org.apache.http.impl.execchain.ProtocolExec.execute( {noformat} Steps to reproduce: # download and install IBM JRE # start nexus 2.x with IBM JRE # configure a proxy repository with a https remote # navigate to "browse remote" and try to browse the content Suggested fix Use the plattform independent way to set the host for SNI as documented by Oracle: Quick fix Remove dependency on Oracle JRE by using reflection to access SSLSocketImpl. The quick fix makes https usable for non-Oracle JREs, but removes SNI support for these JREs. --- --- *The quick was implemented in this issue - SNI still does not work for any JVM other than Oracle JVMs. See NEXUS-6844.* --- ---

    Sonatype JIRA | 5 months ago | Martin Kutter
    java.lang.NoClassDefFoundError: sun/security/ssl/SSLSocketImpl

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError


    2. ${project.groupId}:${project.artifactId}
      1 frame
    3. Apache HttpClient
      1. org.apache.http.impl.conn.HttpClientConnectionOperator.connect(
      2. org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(
      3. org.apache.http.impl.execchain.MainClientExec.establishRoute(
      4. org.apache.http.impl.execchain.MainClientExec.execute(
      5. org.apache.http.impl.execchain.ProtocolExec.execute(
      5 frames