Skip to content

Releases: mongodb/mongo-java-driver

2.13.1

13 Apr 21:13
Compare
Choose a tag to compare

Java Driver 2.13.1 (April 13, 2015)

The 2.13.1 MongoDB Java Driver is a patch to the 2.13.0 release. It contains the following minor changes:

  • JAVA-1738: OSGi Import-Package is missing javax.crypto and javax.crypto.spec
  • JAVA-1641: Remove errant Deprecation annotation on MongoClientOptions.Builder.localThreshold()

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.13/

3.0.0

31 Mar 20:25
Compare
Choose a tag to compare

Java Driver 3.0.0 (March 31, 2015)

The 3.0.0 MongoDB Java Driver is a major release that includes bug fixes, new features, and improvements.

As a major release, it is not binary or source compatible with the 2.x release series.

It supports MongoDB server versions from the 2.2 release through the most recent 3.0 release.

The 3.0 Java driver is not a required upgrade for MongoDB 3.0. The 2.13.0 release is the minimum required for full compatibility with MongoDB 3.0.

Reference documentation

The new documentation hub includes extensive documentation of the 3.0 driver, including

and much more.

API Documentation

http://api.mongodb.org/java/3.0/

README

https://github.com/mongodb/mongo-java-driver/blob/master/README.md

Bug fixes

You can find a full list of bug fixes here.

New Features

You can find a full list of new features here.

Improvements

You can find a full list of improvements here.

2.13.0

29 Jan 14:50
Compare
Choose a tag to compare

Java Driver 2.13.0 (January 29, 2015)

The 2.13.0 MongoDB Java Driver includes bug fixes, new features, and improvements. It is binary compatible with the 2.12 release line and supports all MongoDB server versions from the 2.2 release through the upcoming 3.0 release.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.13/

Compatibility

If you are deploying MongoDB version 3.0 with authentication enabled, and one of the following holds true:

  • You have no existing users created in the database
  • You plan to execute the authSchemaUpgrade command

then you MUST first

Otherwise, authentication will fail because the server is expecting the driver to use the new SCRAM-SHA1 authentication protocol rather than the MONGODB-CR authentication protocol that it replaces.

Bug fixes

You can find a full list of bug fixes here.

New Features

You can find a full list of new features here.

Improvements

You can find a full list of improvements here.

And finally: this will be the last feature release before the 3.0 driver release, which will contain backwards breaking changes. The 2.13 release deprecates some additional classes and methods, most of which will be removed in 3.0. So to prepare for an eventual upgrade, please compile against 2.13 with deprecation warnings enabled. Code which compiles without any deprecation warnings against 2.13 should run without modification against the eventual 3.0 release. You can find a complete list of deprecated classes and methods that will be removed in the 3.0 release here. You can find the list of deprecations added in the 2.13 release here.

2.12.5

15 Jan 15:45
Compare
Choose a tag to compare

Java Driver 2.12.5 (January 15, 2015)

The 2.12.5 Java driver is a patch release. It is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.12/

Bugs:

  • JAVA-1541: unordered bulk writes should continue sending batches after an error
  • JAVA-1613: Race condition on DBPort usage during write commands
  • JAVA-1581: Driver throws IllegalStateException unnecessarily

2.12.4

15 Oct 16:26
Compare
Choose a tag to compare

Java Driver 2.12.4 (October 15, 2014)

The 2.12.4 Java driver is a patch release. It is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.12/

Bugs:

  • JAVA-1164: ThreadLocal anonymous subclass prevents classloader from being GC'd
  • JAVA-1473: findOne overload that takes only the value of the _id field does not apply read preference to mongos properly

Improvements:

  • JAVA-1477: Server selection exception should chain exceptions from server monitors

2.12.3

21 Jul 14:50
Compare
Choose a tag to compare

Java Driver 2.12.3 (July 21, 2014)

The 2.12.3 Java driver is a patch release. It is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.12/

Bugs:

  • JAVA-1253: AggregationOutput should not throw IllegalArgumentException on command failure
  • JAVA-1254: Some helper methods wrapping commands do not throw on error
  • JAVA-1287: WriteResult.isUpdateOfExisting reports wrong value running against MongoDB 2.6
  • JAVA-1295: Server Monitor does not log failed connection attempt
  • JAVA-1246: If two instances of the same standalone server is passed to MongoClient, the driver removes it from the cluster monitor
  • JAVA-1284: Include full wait time in timeout exceptions
  • JAVA-1285: Force frequent connection attempts when waiting for cluster description

Improvements:

  • JAVA-1263: Handle Bulk API edge case for pre-2.6 servers when upserted _id not returned
  • JAVA-1272: Support reading MongoDB Extended JSON containing $numberLong
  • JAVA-1252: Should invalidate connection pool when ServerMonitor detects a disconnect

2.12.2

20 May 13:31
Compare
Choose a tag to compare

Java Driver 2.12.2 (May 20, 2014)

The 2.12.2 Java driver is a patch release. It is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.12/

Bugs:

  • JAVA-1202: Driver should dedicate a thread to monitor each server
  • JAVA-1192: BasicBSONObject.equals method broken for BasicDBList
  • JAVA-1194: Stop logging that the primary has changed when it's stayed the same
  • JAVA-1207: Driver incorrectly converts nanoseconds to milliseconds in Level.FINE log message
  • JAVA-1221: Avoid possible NPEs in JMXConnectionPoolListener

Improvements:

  • JAVA-1216: Remove special handling of setVersion reported by ismaster
  • JAVA-1217: Increase retry frequency of heartbeat only when necessary
  • JAVA-1218: Remove DBPort.finalize() method
  • JAVA-1219: Delay creation of DBDecoder in DBPort until after the socket is successfully opened
  • JAVA-1220: DBPort should avoid turning the active query into a string unless it's needed.

2.12.1

29 Apr 15:14
Compare
Choose a tag to compare

Java Driver 2.12.1 (April 29, 2014)

The 2.12.1 Java driver is a patch release. It is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.12/

Regressions:

  • JAVA-1161: A replica set member that doesn't report its name results in removal of all servers from the client view of the replica set
  • JAVA-1181: Authentication is not done for DBCollection.createIndex()
  • JAVA-1187: Be less aggressive closing connections on exceptions
  • JAVA-1160: Driver can't connect to a member of an un-initiated replica set
  • JAVA-1178: wnote and jnote should not be treated as errors

Bugs:

  • JAVA-1185: Replace ':' with "." in new logger names.

Improvements:

  • JAVA-1159: Retry once before declaring a server down
  • JAVA-1171: Allow command documents to exceed the max document size

2.12.0

03 Apr 15:08
Compare
Choose a tag to compare

Java Driver 2.12.0 (April 3, 2014)

The 2.12.0 MongoDB Java Driver includes bug fixes, new features, and improvements. It is binary compatible with 2.11.4 except for any incompatibilities explicitly noted below, and supports all MongoDB server versions since 2.0.

This is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.12/

Compatibility changes

  • The domain for JMX MBeans registered by the driver has changed from "com.mongodb" to "org.mongodb.driver".
  • The driver's connection pool no longer supports connection affinity to threads. Previous versions of the driver tried to provide a given thread the same connection to a MongoDB server as was provided to it the last time it requested one. This was done on a best effort, so that if the max pool size was less than the number of threads using a MongoClient instance, connections would be shared amongst those threads and there would be no guarantee of any connection affinity. But if the max pool size was greater or equal to the number of threads, then effectively each thread would have its own dedicated connection.
    In this release the connection affinity has been removed as part of a re-write of the connection pool. While this will have no effects on most driver users, it will have ramifications for some:
    • For applications that access mongos servers through a load balancer, ensure that the load balancer is configured according to the guidelines for client affinity. If the load balancer is instead configured to allocate connections to mongos servers with the least load or in a round-robin fashion, applications are more likely to experience failures when iterating query results.
    • For applications using unacknowledged writes and subsequently calling WriteResult.getLastError (directly or indirectly, through any of the now-deprecated methods in WriteResult). Even in previous versions of the driver, this call could fail if the connection was "stolen" by another thread, but the removal of connection affinity makes failure of this method more likely. To avoid any issues, replace calls to any of the deprecated methods in the WriteResult class with an acknowledged write, which will throw an exception if the write fails. Note that if you are constructing MongoClient
      instances (rather than deprecated Mongo instances) the driver will default to using acknowledged writes.
  • The methods getStatistics and memSize in DBPortPool have been removed.

Features

This release supports all the new features introduced in MongoDB 2.6, including:

Additionally, this release includes these new driver features:

  • Improved replica set monitoring, including more predictable fail-fast behavior, faster discovery, faster detection of IP address changes, and configuration via MongoClientOptions.
  • Improved connection pooling, including support for maxConnectionIdleTime, maxConnectionLifeTime, and minPoolSize properties
  • Support for IPv6 literal host names

Finally, this release is most likely the last feature release before the 3.0 release, which will contain backwards-breaking changes. To prepare for 3.0, the 2.12 release deprecates many classes and methods, most of which will be removed in 3.0. So to prepare for an eventual upgrade, please compile against 2.12 with deprecation warnings enabled. Code which compiles without any deprecation warnings against 2.12 should run without modification against the eventual 3.0 release. You can find a complete list of deprecated classes and methods that will be removed in the 3.0 release here.

Additionally, the 2.12.0 release will be the last non-bug fix release that will support Java 5.

Issues fixed since the last release candidate

You can find a list of bug fixes since the last release candidate here.

Bug fixes

You can find a full list of bug fixes here.

Improvements

You can find a full list of improvements here.

New Features

You can find a full list of new features here.

2.11.4

27 Jan 18:05
Compare
Choose a tag to compare

Java Driver 2.11.4 (January 27, 2014)

The 2.11.4 Java driver is a bug fix release. It is a recommended upgrade for all users.

Downloads

Below and on maven central

Docs

http://api.mongodb.org/java/2.11.4/

Regressions:

  • JAVA-1070: driver doesn't allow null characters in field values

Bugs:

  • JAVA-1071: Allow authentication when primary is unreachable