Cassandra and java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path Error

Last updated
App Shah
Crunchify » Java and J2EE Tutorials » Cassandra and java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path Error

I’m running Apache Cassandra on my MAC OS 10.9.4 and while running it I got below error in my Eclipse Console. Seems only appears on MAC OS X. No error on Windows system.

java.lang.reflect.InvocationTargetException Error for Snappy-Java

java.lang.UnsatisfiedLinkError - no snappyjava in java.library.path

Java Version I’m running:

bash-3.2$ java -version
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

No snappy-java in java.library.path” (JDK 1.7 issue?). Snappy compression doesn’t work with JDK7 on Mac OSX. It turns out this is a path bug with Snappy affecting Java 7 on OS X and it does’t part of Mac version of Java. The only solution is to have it available in your Eclipse project.

You could solve this in two different ways:

1) Download Jar: and include into your project class path.
2) If you have maven project just add to your maven dependancy.


There are the basic features of Snappy Library:

  • JNI-based implementation to achieve comparable performance to the native C++ version.
    • Although snappy-java uses JNI, it can be used safely with multiple class loaders (e.g. Tomcat, etc.).
  • Supporting compression/decompression of Java primitive arrays (float[]double[]int[]short[],long[], etc.)
  • Fast compression/decompression tailored to 64-bit CPU architecture.
  • Portable across various operating systems; Snappy-java contains native libraries built for Window/Mac/Linux (64-bit). snappy-java loads one of these libraries according to your machine environment (It looks system properties, and os.arch).

Hope this resolves your above Snappy Java Error. Let me know for any query you have. List of all Java Tutorials.

1 thought on “Cassandra and java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path Error”

Leave a Comment