cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yuki Morishita <mor.y...@gmail.com>
Subject Re: ClassCastException during Cassandra server startup
Date Fri, 29 Jun 2012 15:31:03 GMT
That was bug in 1.1.1 and fixed in https://issues.apache.org/jira/browse/CASSANDRA-4331.
Workaround is deleting the key cache files for your index CFs should fix this.



Yuki


On Friday, June 29, 2012 at 10:02 AM, Thierry Templier wrote:

> Hello,
> 
> My problem seems to occur after a server restart. As a matter of fact, 
> if I clean the data, create a new keyspace and and its structure with 
> cqlsh, I can use the database correctly (both with cqlsh and a Java 
> application with Astyanax). If I stop the server and restart it, I have 
> my problem and then my requests don't work anymore (for example, 
> requests with where clause).
> 
> Thanks for your help!
> Thierry
> 
> > Hello,
> > 
> > When I start the Cassandra server, some exceptions occur:
> > 
> > INFO 10:22:16,014 reading saved cache 
> > /var/lib/cassandra/saved_caches/apispark-CellMessage-KeyCache
> > INFO 10:22:16,016 Opening 
> > /var/lib/cassandra/data/apispark/CellMessage/apispark-CellMessage-hd-2 
> > (498 bytes)
> > INFO 10:22:16,016 Opening 
> > /var/lib/cassandra/data/apispark/CellMessage/apispark-CellMessage-hd-1 
> > (635 bytes)
> > INFO 10:22:16,041 Creating new index : 
> > ColumnDefinition{name=76657273696f6e, 
> > validator=org.apache.cassandra.db.marshal.UTF8Type, index_type=KEYS, 
> > index_name='cellmessage_version'}
> > INFO 10:22:16,045 reading saved cache 
> > /var/lib/cassandra/saved_caches/apispark-CellMessage.cellmessage_version-KeyCache
> > INFO 10:22:16,066 Opening 
> > /var/lib/cassandra/data/apispark/CellMessage/apispark-CellMessage.cellmessage_version-hd-2

> > (349 bytes)
> > INFO 10:22:16,066 Opening 
> > /var/lib/cassandra/data/apispark/CellMessage/apispark-CellMessage.cellmessage_version-hd-1

> > (401 bytes)
> > ERROR 10:22:16,068 Exception in thread Thread[SSTableBatchOpen:1,5,main]
> > java.lang.ClassCastException: java.math.BigInteger cannot be cast to 
> > java.nio.ByteBuffer
> > at org.apache.cassandra.db.marshal.UTF8Type.compare(UTF8Type.java:27)
> > at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
> > at 
> > org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
> > at 
> > org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
> > at java.util.TreeMap.getEntry(TreeMap.java:345)
> > at java.util.TreeMap.containsKey(TreeMap.java:226)
> > at java.util.TreeSet.contains(TreeSet.java:234)
> > at 
> > org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:396)
> > at 
> > org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:187)
> > at 
> > org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:225)
> > at 
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > at 
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> > at 
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> > at java.lang.Thread.run(Thread.java:636)
> > ERROR 10:22:16,071 Exception in thread Thread[SSTableBatchOpen:2,5,main]
> > java.lang.ClassCastException: java.math.BigInteger cannot be cast to 
> > java.nio.ByteBuffer
> > at org.apache.cassandra.db.marshal.UTF8Type.compare(UTF8Type.java:27)
> > at org.apache.cassandra.dht.LocalToken.compareTo(LocalToken.java:45)
> > at 
> > org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:89)
> > at 
> > org.apache.cassandra.db.DecoratedKey.compareTo(DecoratedKey.java:38)
> > at java.util.TreeMap.getEntry(TreeMap.java:345)
> > at java.util.TreeMap.containsKey(TreeMap.java:226)
> > at java.util.TreeSet.contains(TreeSet.java:234)
> > at 
> > org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:396)
> > at 
> > org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:187)
> > at 
> > org.apache.cassandra.io.sstable.SSTableReader$1.run(SSTableReader.java:225)
> > at 
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > at 
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> > at 
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> > at java.lang.Thread.run(Thread.java:636)
> > 
> > Here is the definition of the related table CellMessage:
> > 
> > CREATE TABLE CellMessage (
> > id text PRIMARY KEY,
> > "type" text,
> > version text,
> > content text,
> > title text,
> > generated text,
> > date text
> > ) WITH
> > comment='' AND
> > comparator=text AND
> > read_repair_chance=0.100000 AND
> > gc_grace_seconds=864000 AND
> > default_validation=text AND
> > min_compaction_threshold=4 AND
> > max_compaction_threshold=32 AND
> > replicate_on_write='true' AND
> > compaction_strategy_class='SizeTieredCompactionStrategy' AND
> > compression_parameters:sstable_compression='SnappyCompressor';
> > 
> > CREATE INDEX cellmessage_version ON CellMessage (version);
> > 
> > Such errors occur for most tables I defined...
> > 
> > Thanks very much for your help!
> > Thierry
> > 
> 
> 
> 



Mime
View raw message