java.lang.NoClassDefFoundError: javax/security/cert/X509Certificate

DataStax JIRA | Marcus Olsson | 9 months ago
  1. 0

    When using the shaded 3.0.0 java driver in Apache Karaf we get the following error when the driver is connecting to the cluster: {noformat} java.lang.NoClassDefFoundError: javax/security/cert/X509Certificate at com.datastax.shaded.netty.util.internal.EmptyArrays.<clinit>(EmptyArrays.java:40) at com.datastax.shaded.netty.util.concurrent.DefaultPromise.<clinit>(DefaultPromise.java:44) at com.datastax.shaded.netty.util.concurrent.GlobalEventExecutor.<init>(GlobalEventExecutor.java:44) at com.datastax.shaded.netty.util.concurrent.GlobalEventExecutor.<clinit>(GlobalEventExecutor.java:41) at com.datastax.driver.core.Connection$Factory.<init>(Connection.java:684) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1365) at com.datastax.driver.core.Cluster.init(Cluster.java:162) at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333) at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308) at com.datastax.driver.core.Cluster.connect(Cluster.java:250) {noformat} Something to note is that we did not have SSL enabled while connecting and also that this stopped working when going from versions 2.1.9 -> 3.0.0. There is a different netty version between the two, 4.0.27.Final and 4.0.33.Final. The problem seems to be that in netty-common there is an OSGI package import for *javax.security.cert* which is not imported in the shaded java driver. The fix would be to add javax.security.cert to the import package of the shaded java driver. This problem will probably affect version 2.1 of the java driver as well, but there hasn't been a release with the newer netty version yet.

    DataStax JIRA | 9 months ago | Marcus Olsson
    java.lang.NoClassDefFoundError: javax/security/cert/X509Certificate
  2. 0

    When using the shaded 3.0.0 java driver in Apache Karaf we get the following error when the driver is connecting to the cluster: {noformat} java.lang.NoClassDefFoundError: javax/security/cert/X509Certificate at com.datastax.shaded.netty.util.internal.EmptyArrays.<clinit>(EmptyArrays.java:40) at com.datastax.shaded.netty.util.concurrent.DefaultPromise.<clinit>(DefaultPromise.java:44) at com.datastax.shaded.netty.util.concurrent.GlobalEventExecutor.<init>(GlobalEventExecutor.java:44) at com.datastax.shaded.netty.util.concurrent.GlobalEventExecutor.<clinit>(GlobalEventExecutor.java:41) at com.datastax.driver.core.Connection$Factory.<init>(Connection.java:684) at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1365) at com.datastax.driver.core.Cluster.init(Cluster.java:162) at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333) at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308) at com.datastax.driver.core.Cluster.connect(Cluster.java:250) {noformat} Something to note is that we did not have SSL enabled while connecting and also that this stopped working when going from versions 2.1.9 -> 3.0.0. There is a different netty version between the two, 4.0.27.Final and 4.0.33.Final. The problem seems to be that in netty-common there is an OSGI package import for *javax.security.cert* which is not imported in the shaded java driver. The fix would be to add javax.security.cert to the import package of the shaded java driver. This problem will probably affect version 2.1 of the java driver as well, but there hasn't been a release with the newer netty version yet.

    DataStax JIRA | 9 months ago | Marcus Olsson
    java.lang.NoClassDefFoundError: javax/security/cert/X509Certificate
  3. 0

    Problem in creating keystore

    Oracle Community | 1 decade ago | 3004
    java.lang.NoClassDefFoundError: javax/security/cert/CertificateException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    can't generate keystore

    Oracle Community | 1 decade ago | 3004
    java.lang.NoClassDefFoundError: javax/security/cert/CertificateException at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapp er.java:25)
  6. 0

    Re: WSA 6.0 deployment with jsr-88

    Google Groups | 1 decade ago | thi...@ceira.com
    java.lang.NoClassDefFoundError: com/ibm/security/cert/IBMCertPath

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      javax/security/cert/X509Certificate

      at com.datastax.shaded.netty.util.internal.EmptyArrays.<clinit>()
    2. DataStax Java Driver for Apache Cassandra - Core
      EmptyArrays.<clinit>
      1. com.datastax.shaded.netty.util.internal.EmptyArrays.<clinit>(EmptyArrays.java:40)
      1 frame
    3. com.datastax.shaded
      GlobalEventExecutor.<clinit>
      1. com.datastax.shaded.netty.util.concurrent.DefaultPromise.<clinit>(DefaultPromise.java:44)
      2. com.datastax.shaded.netty.util.concurrent.GlobalEventExecutor.<init>(GlobalEventExecutor.java:44)
      3. com.datastax.shaded.netty.util.concurrent.GlobalEventExecutor.<clinit>(GlobalEventExecutor.java:41)
      3 frames
    4. DataStax Java Driver for Apache Cassandra - Core
      Cluster.connect
      1. com.datastax.driver.core.Connection$Factory.<init>(Connection.java:684)
      2. com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1365)
      3. com.datastax.driver.core.Cluster.init(Cluster.java:162)
      4. com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333)
      5. com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308)
      6. com.datastax.driver.core.Cluster.connect(Cluster.java:250)
      6 frames