Skip to content

Releases: mongodb/mongo-java-driver

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

2.11.3

12 Sep 20:42
Compare
Choose a tag to compare

Java Driver 2.11.3 (September 12, 2013)

The 2.11.3 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.3/

Regressions:

  • JAVA-853: Client runs out of connections with nested calls to DB.requestStart
  • JAVA-812: Setting slaveOK() does not result in a secondary read preference through mongos
  • JAVA-872: MongoOptions neglects to copy alwaysUseMBeans property

Bugs:

  • JAVA-790: Wrong type for option 'unique' in GridFS constructor
  • JAVA-905: BasicBSONObject.equals doesn't handle Number values correctly
  • JAVA-891: Document fields accept NULL characters

Improvements:

  • JAVA-836: Only log on server availability state changes
  • JAVA-851: Increase GridFS max chunk size

2.11.2

13 Sep 14:32
Compare
Choose a tag to compare

Java Driver 2.11.2 (June 20, 2013)

The 2.11.2 Java is a bug fix release and is a recommended upgrade.

Downloads

maven central and
driver-downloads.mongodb.org

###Docs
http://api.mongodb.org/java/2.11.2/

Bugs:

  • JAVA-401: "not master" MongoException when using GridFS with a direction connection to a secondary
  • JAVA-820: DBCollection Doesn't Check Keys Contained By Lists
  • JAVA-847: Remove call to String.isEmpty() in MongoClientURI

Improvements:

  • JAVA-814: Unable to create a full text index on $**
  • JAVA-837: Text-search on secondaries

2.11.1

13 Sep 14:33
Compare
Choose a tag to compare

Java Driver 2.11.1 (April 8, 2013)

The 2.11.1 Java driver fixes a regression introduced in 2.11.0 that can affect clients that authenticate against sharded clusters.

Downloads

maven central and
driver-downloads.mongodb.org

###Docs
http://api.mongodb.org/java/2.11.1/

Bugs:

  • JAVA-793: Race condition in com.mongodb.DBTCPConnector#authenticate method

Improvements

  • JAVA-802: Use $query and $orderby in query document instead of query and orderby

2.11.0

13 Sep 14:34
Compare
Choose a tag to compare

Java Driver 2.11.0 (March 19, 2013)

The 2.11.0 Java driver fully supports the MongoDB 2.4 security enhancements, which include:

Downloads

maven central and
driver-downloads.mongodb.org

Docs

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

New Features:

  • JAVA-691: Authentication enhancements
  • JAVA-431: the find() method of GridFS should allow specification of sort criteria

Improvements:

  • JAVA-673: MongoURI should allow configuring default SSL socket factory
  • JAVA-725: Deprecate MongoURI, MongoOptions, and Mongo constructors
  • JAVA-728: Improve logging of Mongo instance construction
  • JAVA-733: JSON.parse() should handle $binary object correctly
  • JAVA-734: JSON.parse() should handle $timestamp correctly
  • JAVA-735: Binary class should implements Equals and HashCode
  • JAVA-741: Ability to disable validation for illegal characters in keys
  • JAVA-743: JSONCallback should apply decoding hooks for all supported types
  • JAVA-744: Add convenience methods for MongoClientOptions
  • JAVA-757: Exceptions throws for GLE should contain the entire GLE document
  • JAVA-768: Use ReadPreference.primaryPreferred() for authentication
  • JAVA-780: Expose MongoClientURI constructor for overriding default options
  • JAVA-785: Improve logging of socket errors

Bugs fixes:

  • JAVA-595: With redeploy web app created a ThreadLocal but failed to remove it when the web application was stopped
  • JAVA-641: JMX registration error
  • JAVA-657: ReadPrefs ignored for some commands due to case-sensitive comparison
  • JAVA-703: GridFS List find( DBObject query ,...) should close cursor
  • JAVA-705: Query commands like aggregate and mapReduce don't pick up the read preference set on the collection
  • JAVA-708: ReadPreference.nearest() does not count primary in expected way
  • JAVA-720: DBCursor.next() throws the wrong Exception
  • JAVA-722: Errors when DBRef's $id is Object instead of simple value
  • JAVA-753: Java Driver sending reads with NEAREST preference to nodes in RECOVERING state
  • JAVA-772: If cursor is not found by the server, report in the exception the cursor that was requested
  • JAVA-787: DBTCPConnector._checkWriteError () consume a PoolOutputBuffer not returned to SimplePool