Improve communication that Guava 16.01+ is required for java-driver 3.0+

Description

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.

Environment

None

Pull Requests

None

Activity

Show:
Alex Popescu
October 22, 2015, 4:13 PM

Adding an FAQ entry would be helpful once indexed as the exception message is pretty particular and would show up in searches.

Andy Tolbert
October 23, 2015, 12:09 AM

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.

Andy Tolbert
October 29, 2015, 4:37 PM

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.

Fixed

Assignee

Andy Tolbert

Reporter

Andy Tolbert

Labels

None

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure