You can see the following exception when you running WSO2 MB 2.2.0 top of the MAC OS.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.xerial.snappy.SnappyLoader.loadNativeLibrary(SnappyLoader.java:317)
at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:219)
at org.xerial.snappy.Snappy.(Snappy.java:44)
at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:45)
at org.apache.cassandra.io.compress.SnappyCompressor.isAvailable(SnappyCompressor.java:55)
at org.apache.cassandra.io.compress.SnappyCompressor.(SnappyCompressor.java:37)
at org.apache.cassandra.config.CFMetaData.(CFMetaData.java:82)
at org.apache.cassandra.config.KSMetaData.systemKeyspace(KSMetaData.java:81)
at org.apache.cassandra.config.DatabaseDescriptor.loadYaml(DatabaseDescriptor.java:491)
at org.apache.cassandra.config.DatabaseDescriptor.(DatabaseDescriptor.java:132)
at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:216)
at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:447)
at org.wso2.carbon.cassandra.server.CassandraServerController$1.run(CassandraServerController.java:67)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1886)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at org.xerial.snappy.SnappyNativeLoader.loadLibrary(SnappyNativeLoader.java:52)
Solution.
- Clone the https://github.com/xerial/snappy-java repository to you machine.
- Run "make" command inside the cloned directory.
- Copy "target/snappy-1.1.1-Mac-x86_64/libsnappyjava.jnilib" file in to the MB home directory. This will fix the issue.
Comments