I'm using the Bloom filter and Funnel classes in Guava. Rather than adding the JARs individually, I added a dependency on Guava using Maven.
When I used the Bloom filter class originally, it had no issues. But when I started using the Funnel class (in the same file with the same dependency section, classpath, etc.) I get the errors
java.lang.NoClassDefFoundError: com/google/common/hash/Funnels
and
java.lang.ClassNotFoundException.
Guava is a library people typically have problems with because it frequently breaks backward compatibility. Also many projects include it as a transitive dependency, so you can be stuck in a situation with multiple versions of guava on your class path. Try the following:
mvn dependency:treecommand to see all the versions of guava that are being sucked into your classpath. If you see more than one version of guava, exclude guava from the dependencies that rely on it in your pom.