Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-15929

Startup fails with NoClassDefFoundError after CASSANDRA-15884

    XMLWordPrintableJSON

    Details

      Description

      CASSANDRA-15884 added logic to detect if the native lib of lz4 was properly loaded and to log a warning if this was not the case, it seems that the catch for this didn’t handle the class loading issue that also happens in this case.

      ERROR [main] 2020-07-07 22:49:32,560 CassandraDaemon.java:800 - Exception encountered during startup
      java.lang.NoClassDefFoundError: Could not initialize class net.jpountz.lz4.LZ4JNI
             at net.jpountz.lz4.LZ4JNICompressor.compress(LZ4JNICompressor.java:36)
             at net.jpountz.lz4.LZ4Factory.<init>(LZ4Factory.java:207)
             at net.jpountz.lz4.LZ4Factory.instance(LZ4Factory.java:51)
             at net.jpountz.lz4.LZ4Factory.nativeInstance(LZ4Factory.java:91)
             at org.apache.cassandra.service.StartupChecks.lambda$static$0(StartupChecks.java:149)
             at org.apache.cassandra.service.StartupChecks.verify(StartupChecks.java:127)
             at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:211)
             at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:661)
             at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:778)
      

      After patching, the following is the behavior

      WARN [main] 2020-07-07 22:50:45,018 StartupChecks.java:153 - lz4-java was unable to load native libraries; this will lower the performance of lz4 (network/sstables/etc.): Could not initialize class net.jpountz.lz4.LZ4JNI

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dcapwell David Capwell
                Reporter:
                dcapwell David Capwell
                Authors:
                David Capwell
                Reviewers:
                Benjamin Lerer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: