While running Achilles tests for my Cassandra DAO, I ran into this error:
19:23:33.790 [CompactionExecutor:2] ERROR o.a.c.service.CassandraDaemon - Exception in thread Thread[CompactionExecutor:2,1,main] java.lang.NoSuchMethodError: com.google.common.util.concurrent.RateLimiter.acquire(I)V at org.apache.cassandra.io.compress.CompressedThrottledReader.reBuffer(CompressedThrottledReader.java:40) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.io.util.RandomAccessReader.seek(RandomAccessReader.java:283) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.computeNext(SSTableScanner.java:262) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.computeNext(SSTableScanner.java:203) ~[cassandra-all-2.0.10.jar:2.0.10] at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143) ~[guava-16.0.1.jar:na] at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138) ~[guava-16.0.1.jar:na] at org.apache.cassandra.io.sstable.SSTableScanner.hasNext(SSTableScanner.java:183) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.utils.MergeIterator$Candidate.advance(MergeIterator.java:144) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.utils.MergeIterator$ManyToOne.<init>(MergeIterator.java:87) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.utils.MergeIterator.get(MergeIterator.java:46) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.db.compaction.CompactionIterable.iterator(CompactionIterable.java:47) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.db.compaction.CompactionTask.runWith(CompactionTask.java:129) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.io.util.DiskAwareRunnable.runMayThrow(DiskAwareRunnable.java:48) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:60) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59) ~[cassandra-all-2.0.10.jar:2.0.10] at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:198) ~[cassandra-all-2.0.10.jar:2.0.10] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ~[na:1.7.0_60] at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_60] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
Some background, my pom contains:
<dependency> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> <version>18.0</version> </dependency> <dependency> <groupId>info.archinnov</groupId> <artifactId>achilles-core</artifactId> <version>3.0.7</version> <scope>test</scope> <exclusions> <exclusion> <groupId>com.google.guava</groupId> <artifactId>guava</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>info.archinnov</groupId> <artifactId>achilles-junit</artifactId> <version>3.0.7</version> <scope>test</scope> </dependency>
The solution? Unfortunately downgrading Google Guava from 18 to 15. I tried multiple versions in between, and different Achilles versions, but ultimately this was the only solution if you want to use Achilles.
This issue was a bug (https://issues.apache.org/jira/browse/CASSANDRA-6639) which was fixed in Cassandra 2.1.0, but Achilles does not support Cassandra 2.1, only 2.0.*