Cassandra 1.0.1 and only seemed to happen with
* JAVA_HOME=/usr/lib/jvm/java-6-sun
and jna.jar copied into /usr/share/cassandra(/lib)
I then saw the detail in the init script and how it was being linked

Is there a way I can verify which provider is being used? I want to make
sure Off heap is being used in the default config.

On 03/11/11 19:06, paul cannon wrote:
> I can't reproduce this. What version of the cassandra deb are you using,
> exactly, and why are you symlinking or copying jna.jar into
> /usr/share/cassandra?  The initscript should be adding
> /usr/sahre/java/jna.jar to the classpath, and that should be all you need.
> 
> The failure you see with o.a.c.cache.FreeableMemory is not because the
> jre can't find the class, it's just that it can't initialize the class
> (because it needs JNA, and it can't find JNA).
> 
> p
> 
> On Wed, Nov 2, 2011 at 4:42 AM, Peter Tillotson <slatem...@yahoo.co.uk
> <mailto:slatem...@yahoo.co.uk>> wrote:
> 
>     see below
>      * JAVA_HOME=/usr/lib/jvm/java-6-openjdk 
>     works
>     --
>     Reading the documentation over at Datastax
>     “The Debian and RPM packages of Cassandra install JNA automatically”
>     
> http://www.datastax.com/dev/blog/whats-new-in-cassandra-1-0-improved-memory-and-disk-space-management
> 
>     And indeed the Debian package depends on jna, and the
>     /etc/init.d/cassandra looks as though in adds
>     /usr/share/java/jna.jar to the classpath, and here is the but. 
> 
>     If I copy or symlink jna.jar into:
>      * /usr/share/cassandra
>      * /usr/share/cassandra/lib
>     Whenever a column family initialises I get:
>     java.lang.NoClassDefFoundError: Could not initialize class
>     org.apache.cassandra.cache.FreeableMemory
> 
>     This suggests to me that:
>      1) By default, for me at least, in Debian jna.jar is not on the
>     classpath
>      2) There is an additional classpath issue
>          jar -tf apache-cassandra.jar | grep "FreeableMemory" succeeds
> 
>     I'm running on: 
>      * Ubuntu 10.04 x64
>      * JAVA_HOME=/usr/lib/jvm/java-6-sun
> 
>     Full stack traces:
>     java.lang.NoClassDefFoundError: Could not initialize class
>     com.sun.jna.Native
>             at com.sun.jna.Pointer.<clinit>(Pointer.java:42)
>             at
>     
> org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:92)
>             at
>     org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:154)
>             at
>     
> org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:63)
>             at
>     
> org.apache.cassandra.db.ColumnFamilyStore.cacheRow(ColumnFamilyStore.java:1150)
>             at
>     
> org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1174)
>             at
>     
> org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1131)
>             at org.apache.cassandra.db.Table.getRow(Table.java:378)
>             at
>     
> org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:61)
>             at
>     
> org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:797)
>             at
>     
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1265)
>             at
>     
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>             at
>     
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>             at java.lang.Thread.run(Thread.java:662)
>      INFO [pool-1-thread-1] 2011-11-02 10:26:46,738 Memtable.java (line
>     177) CFS(Keyspace='BigSet', ColumnFamily='theKeys') liveRatio is
>     18.20062753783684 (just-counted was 16.960966424636872).
>      calculation took 408ms for 8169 columns
>     ERROR [ReadStage:33] 2011-11-02 10:26:56,599
>     AbstractCassandraDaemon.java (line 133) Fatal exception in thread
>     Thread[ReadStage:33,5,main]
>     java.lang.NoClassDefFoundError: Could not initialize class
>     org.apache.cassandra.cache.FreeableMemory
>             at
>     
> org.apache.cassandra.cache.SerializingCache.serialize(SerializingCache.java:92)
>             at
>     org.apache.cassandra.cache.SerializingCache.put(SerializingCache.java:154)
>             at
>     
> org.apache.cassandra.cache.InstrumentingCache.put(InstrumentingCache.java:63)
>             at
>     
> org.apache.cassandra.db.ColumnFamilyStore.cacheRow(ColumnFamilyStore.java:1150)
>             at
>     
> org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1174)
>             at
>     
> org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1131)
>             at org.apache.cassandra.db.Table.getRow(Table.java:378)
>             at
>     
> org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:61)
>             at
>     
> org.apache.cassandra.service.StorageProxy$LocalReadRunnable.runMayThrow(StorageProxy.java:797)
>             at
>     
> org.apache.cassandra.service.StorageProxy$DroppableRunnable.run(StorageProxy.java:1265)
>             at
>     
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 
> 

Reply via email to