A couple of users have run into this issue when upgrading to java-driver 3.0:
This is because they are using an older version of guava (older than 16.01). Guava 16.01 is documented as required in the upgrade guide:
The driver now depends on Guava 16.0.1 (instead of 14.0.1). This update has been mainly motivated by Guava’s Issue #1635, which affects TypeToken, and hence all TypeCodec implementations handling parameterized types.
However there are quite a bit of notes in the upgrade guide, and not everyone reads the guide while upgrading and may assume if their code compiles everything is ok.
It would be useful if we could somehow detect an older guava version in the class path and either warn or throw an explicit runtime exception if this is the case, so users are aware that they need to upgrade guava.
Adding an FAQ entry would be helpful once indexed as the exception message is pretty particular and would show up in searches.
I've created Pull Request #493 for attempting to add a warning message. I also agree on adding a FAQ entry as well to provide some more background info on the problem and will pursue that route as well.
We've decided that it makes more sense to raise an Exception than log an error when this case is detected. The main reasoning is that it is very unlikely for the driver to work with an older version of Guava. In addition, even if it were to work, that doesn't mean a non-API change in a subsequent minor release could break a users code, so it makes sense to throw an exception so the user is forced to deal with it.