[JAVA-1620] 2.12.x breaks compatibility with mongoDB v1.8 Created: 15/Jan/15 Updated: 15/Jan/15 Resolved: 15/Jan/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Jens Rommel | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Using the Java driver 2.12.x against a mongoDB version 1.8 fails at startup due to com.mongodb.MongoTimeoutException caused by java.lang.NullPointerException (see stack trace below). The root cause seems to be the expected existence of "versionArray" in com.mongodb.ServerStateNotifier.getVersion(final CommandResult buildInfoResult) (v. 2.12.0, later moved to ServerMonitor.getVersion in 2.12.2) Apparently, mongoDB v1.8 doesn't provide the version as array. Is having a structured ServerVersion class really worth breaking backwards compatibility? Looks rather accidental to me. com.mongodb.MongoTimeoutException: Timed out after 10000 ms while waiting to connect. Client view of cluster state is {type=Unknown, servers=[{address=127.0.0.1:27017, type=Unknown, state=Connecting, exception={java.lang.NullPointerException}}] |
| Comments |
| Comment by Jens Rommel [ 15/Jan/15 ] |
|
Thanks Jeff! We're going to upgrade our mongodb anyway. We just came across this issue during migration and thought it might have just been accidental. |
| Comment by Jeffrey Yemin [ 15/Jan/15 ] |
|
Hi Jens, The 2.12 driver series is not tested with MongoDB 1.8, as that version is no longer supported, so you'll either have to use an older driver or upgrade to a more recent version of the server. You can see from our test matrix that we test back to server version 2.2. |