lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.09k stars 248 forks source link

Failed to initialize class on Linux system #193

Open stevenlinh opened 2 years ago

stevenlinh commented 2 years ago

Hi,

We are using lz4-java version 1.7.1 on a Linux machine with KAFKA to consume compressed messages from a topic and we got below error:

Failed to receive Kafka records: org.apache.kafka.common.KafkaException:Received exception when fetching the next record from xxxxxxx-0. If needed, please seek past the record to continue consumption.: Received exception when fetching the next record from xxxxxxx-0. If needed, please seek past the record to continue consumption.: java.lang.NoClassDefFoundError: org/apache/kafka/common/compress/KafkaLZ4BlockInputStream : cannot initialize class because prior initialization attempt failed: org/apache/kafka/common/compress/KafkaLZ4BlockInputStream : cannot initialize class because prior initialization attempt failed: java.lang.IllegalAccessError: failed to access class net.jpountz.lz4.LZ4SafeUtils (class loader library:core_lib@49009) from class net.jpountz.lz4.LZ4JavaSafeSafeDecompressor (class loader xxxxxxxxxxx@1688477) at net.jpountz.lz4.LZ4JavaSafeSafeDecompressor.decompress(LZ4JavaSafeSafeDecompressor.java:71)

Result when I ran Linux command uname -a: Linux <I.P Range>-default #1 SMP Tue Mar 1 11:43:17 UTC 2022 (fe89a8c) x86_64 x86_64 x86_64 GNU/Linux

Any idea why the decompression failed?