I ran into this problem today.  It's common enough that it shows up in google, 
but not common enough to have a documented resolution, so here's one.

    [junit] 
com.google.common.collect.ImmutableSet.copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
    [junit] java.lang.NoSuchMethodError: 
com.google.common.collect.ImmutableSet.copyOf(Ljava/util/Collection;)Lcom/google/common/collect/ImmutableSet;
    [junit]     at 
org.apache.cassandra.db.DataTracker$View.replace(DataTracker.java:479)
    [junit]     at 
org.apache.cassandra.db.DataTracker.replace(DataTracker.java:248)
    [junit]     at 
org.apache.cassandra.db.DataTracker.addSSTables(DataTracker.java:219)
    [junit]     at 
org.apache.cassandra.db.ColumnFamilyStore.<init>(ColumnFamilyStore.java:294)
    [junit]     at 
org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:466)
    [junit]     at 
org.apache.cassandra.db.ColumnFamilyStore.createColumnFamilyStore(ColumnFamilyStore.java:436)
    [junit]     at org.apache.cassandra.db.Table.initCf(Table.java:369)
    [junit]     at org.apache.cassandra.db.Table.<init>(Table.java:306)
    [junit]     at org.apache.cassandra.db.Table.open(Table.java:111)
    [junit]     at 
org.apache.cassandra.db.SystemTable.checkHealth(SystemTable.java:212)
    [junit]     at 
org.apache.cassandra.service.AbstractCassandraDaemon.setup(AbstractCassandraDaemon.java:149)
    [junit]     at 
org.apache.cassandra.service.AbstractCassandraDaemon.init(AbstractCassandraDaemon.java:237)
    [junit]     at 
org.apache.cassandra.service.EmbeddedCassandraService.start(EmbeddedCassandraService.java:57)

Resolution:

I was creating a monolithic jar file that takes the contents of all component 
jar files and puts them into one big jar, to simplify deployment of the 
cassandra client I'm writing.  One of the component jars was also a monolithic 
jar and had the contents of google-collections in it. guava is a superset of 
google collections, and that google-collections contents was overwriting the 
expansion of the guava jar.

Removing the component jar file (which was an option in this case) solved the 
problem.


Reply via email to