java.lang.NoClassDefFoundError

com/sun/jna/Native

Samebug tips9

Check if you didn't forget to instantiate your topic in the kafka broker.

A few things cause this exception: 1) Check if you have all jars and if they're in the correct path when running. 2) Your classpath might be broken, you can define it in the command line with "java -cp yourClassPath" or at your IDE if you're using one.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Stack trace

  • java.lang.NoClassDefFoundError: com/sun/jna/Native at org.apache.cassandra.utils.memory.MemoryUtil.allocate(MemoryUtil.java:82)[main/:na] at org.apache.cassandra.io.util.Memory.<init>(Memory.java:74)[main/:na] at org.apache.cassandra.io.util.SafeMemory.<init>(SafeMemory.java:32)[main/:na] at org.apache.cassandra.io.compress.CompressionMetadata$Writer.<init>(CompressionMetadata.java:274)[main/:na] at org.apache.cassandra.io.compress.CompressionMetadata$Writer.open(CompressionMetadata.java:288)[main/:na] at org.apache.cassandra.io.compress.CompressedSequentialWriter.<init>(CompressedSequentialWriter.java:73)[main/:na] at org.apache.cassandra.io.util.SequentialWriter.open(SequentialWriter.java:167)[main/:na] at org.apache.cassandra.io.sstable.format.big.BigTableWriter.<init>(BigTableWriter.java:75)[main/:na] at org.apache.cassandra.io.sstable.format.big.BigFormat$WriterFactory.open(BigFormat.java:107)[main/:na] at org.apache.cassandra.io.sstable.format.SSTableWriter.create(SSTableWriter.java:84)[main/:na] at org.apache.cassandra.db.Memtable$FlushRunnable.createFlushWriter(Memtable.java:419)[main/:na] at org.apache.cassandra.db.Memtable$FlushRunnable.writeSortedContents(Memtable.java:366)[main/:na] at org.apache.cassandra.db.Memtable$FlushRunnable.runMayThrow(Memtable.java:351)[main/:na] at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)[main/:na] at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)[guava-16.0.jar:na] at org.apache.cassandra.db.ColumnFamilyStore$Flush.run(ColumnFamilyStore.java:1121)[main/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[na:1.7.0_76] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[na:1.7.0_76] at java.lang.Thread.run(Thread.java:745)[na:1.7.0_76] Caused by: java.lang.ClassNotFoundException: com.sun.jna.Native at java.net.URLClassLoader$1.run(URLClassLoader.java:366)[na:1.7.0_76] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)[na:1.7.0_76] at java.security.AccessController.doPrivileged(Native Method)[na:1.7.0_76] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)[na:1.7.0_76] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)[na:1.7.0_76] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)[na:1.7.0_76] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[na:1.7.0_76] ... 19 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown user
Once, 1 year ago
Unknown user
Once, 3 weeks ago
Unknown user
Once, 3 weeks ago
Unknown user
Once, 3 weeks ago
Unknown user
Once, 3 weeks ago
2376 more bugmates