xerial/snappy-java

Snappy error on Mac OS Ventura: "no native library is found for os.name=Mac and os.arch=aarch64"

martinwunderlich-celonis opened this issue · 0 comments

Hello snappy team,

running an application on Mac M1 Pro with Ventura 13.6.6, Java Temurin-17.0.9+9 and Snappy 1.1.10.5, I keep getting the following error:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy
	at org.apache.parquet.hadoop.DirectCodecFactory$SnappyCompressor.compress(DirectCodecFactory.java:291)
...
Caused by: java.lang.ExceptionInInitializerError: Exception org.xerial.snappy.SnappyError: no native library is found for os.name=Mac and os.arch=aarch64
	at org.xerial.snappy.SnappyLoader.findNativeLibrary(SnappyLoader.java:331)
	at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:171)
	at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:152)
	at org.xerial.snappy.Snappy.<clinit>(Snappy.java:47)

Snappy is brought in here as a transitive dependency via Apache parque-hadoop 1.10.1.
I have already extracted the Snappy jar and verified that it contains the file libsnappyjava.dylib under org/xerial/snappy/native/Mac/aarch64.

Is it a known issue? Any idea how to fix this? Thanks.