{"id":13452728,"url":"https://github.com/mongodb/mongo-java-driver","last_synced_at":"2026-02-26T22:09:50.480Z","repository":{"id":482367,"uuid":"108050","full_name":"mongodb/mongo-java-driver","owner":"mongodb","description":"The official MongoDB drivers for Java, Kotlin, and Scala","archived":false,"fork":false,"pushed_at":"2025-05-01T08:02:34.000Z","size":139232,"stargazers_count":2631,"open_issues_count":20,"forks_count":1486,"subscribers_count":216,"default_branch":"main","last_synced_at":"2025-05-01T08:44:37.703Z","etag":null,"topics":["database","java","java-library","jvm","kotlin","kotlin-coroutines","kotlin-library","mongodb","scala"],"latest_commit_sha":null,"homepage":"https://www.mongodb.com/docs/drivers/java/sync/current/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2009-01-15T15:16:29.000Z","updated_at":"2025-05-01T08:02:38.000Z","dependencies_parsed_at":"2023-11-06T23:40:08.351Z","dependency_job_id":"89ac4e41-dd7c-4267-8f20-8b99886da8e2","html_url":"https://github.com/mongodb/mongo-java-driver","commit_stats":{"total_commits":8306,"total_committers":227,"mean_commits":"36.590308370044056","dds":"0.48290392487358536","last_synced_commit":"08ec2fc79538720e1eda4fd12afcfddb5ab3ff09"},"previous_names":[],"tags_count":246,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-java-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-java-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-java-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-java-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/mongo-java-driver/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252712112,"owners_count":21792264,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","java","java-library","jvm","kotlin","kotlin-coroutines","kotlin-library","mongodb","scala"],"created_at":"2024-07-31T08:00:21.507Z","updated_at":"2025-11-11T20:57:28.668Z","avatar_url":"https://github.com/mongodb.png","language":"Java","funding_links":[],"categories":["Java","II. Databases, search engines, big data and machine learning","Libraries","Libraries and Drivers"],"sub_categories":["4. Client and drivers for databases","Java"],"readme":"## Release Notes\n\nRelease notes are available [here](https://github.com/mongodb/mongo-java-driver/releases).\n\n## Documentation\n\nReference and API documentation for the Java driver is available [here](https://www.mongodb.com/docs/drivers/java/sync/current/). \n\nReference and API documentation for the Kotlin driver is available [here](https://www.mongodb.com/docs/drivers/kotlin/coroutine/current/).\n\nReference and API documentation for the Scala driver is available [here](https://www.mongodb.com/docs/languages/scala/scala-driver/current/). \n\n## Tutorials / Training\n\nFor tutorials on how to use the MongoDB JVM Drivers, please reference [MongoDB University](https://learn.mongodb.com/). Additional tutorials, videos, and code examples using both the Java Driver and the Kotlin Driver can also be found in the [MongoDB Developer Center](https://www.mongodb.com/developer/).\n\n## Support / Feedback\n\nFor issues with, questions about, or feedback for the MongoDB Java, Kotlin, and Scala drivers, please look into\nour [support channels](https://www.mongodb.com/docs/manual/support/). Please\ndo not email any of the driver developers directly with issues or\nquestions - you're more likely to get an answer on the [MongoDB Community Forums](https://community.mongodb.com/tags/c/drivers-odms-connectors/7/java-driver) or [StackOverflow](https://stackoverflow.com/questions/tagged/mongodb+java).\n\nAt a minimum, please include in your description the exact version of the driver that you are using.  If you are having\nconnectivity issues, it's often also useful to paste in the line of code where you construct the MongoClient instance,\nalong with the values of all parameters that you pass to the constructor. You should also check your application logs for\nany connectivity-related exceptions and post those as well.\n\n## Bugs / Feature Requests\n\nThink you’ve found a bug in the Java, Kotlin, or Scala drivers? Want to see a new feature in the drivers? Please open a\ncase in our issue management tool, JIRA:\n\n- [Create an account and login](https://jira.mongodb.org).\n- Navigate to [the JAVA project](https://jira.mongodb.org/browse/JAVA).\n- Click **Create Issue** - Please provide as much information as possible about the issue type, which driver you are using, and how to reproduce your issue.\n\nBug reports in JIRA for the driver and the Core Server (i.e. SERVER) project are **public**.\n\nIf you’ve identified a security vulnerability in a driver or any other\nMongoDB project, please report it according to the [instructions here](https://www.mongodb.com/docs/manual/tutorial/create-a-vulnerability-report).\n\n## Versioning\n\nWe follow [semantic versioning](https://semver.org/spec/v2.0.0.html) when releasing.\n\n#### @Alpha\n\nAPIs marked with the `@Alpha` annotation are in the early stages of development, subject to incompatible changes, \nor even removal, in a future release and may lack some intended features. An APIs bearing `@Alpha` annotation may \ncontain known issues affecting functionality, performance, and stability. They are also exempt from any compatibility \nguarantees made by its containing library.\n\nIt is inadvisable for \u003ci\u003eapplications\u003c/i\u003e to use Alpha APIs in production environments or for \u003ci\u003elibraries\u003c/i\u003e\n(which get included on users' CLASSPATHs, outside the library developers' control) to depend on these APIs. Alpha APIs\nare intended for \u003cb\u003eexperimental purposes\u003c/b\u003e only.\n\n#### @Beta\n\nAPIs marked with the `@Beta` annotation at the class or method level are subject to change. They can be modified in any way, or even\nremoved, at any time. If your code is a library itself (i.e. it is used on the CLASSPATH of users outside your own control), you should not\nuse beta APIs, unless you repackage them (e.g. by using shading, etc).\n\n#### @Deprecated\n\nAPIs marked with the `@Deprecated` annotation at the class or method level will remain supported until the next major release but it is\nrecommended to stop using them.\n\n#### com.mongodb.internal.*\n\nAll code inside the `com.mongodb.internal.*` packages is considered private API and should not be relied upon at all. It can change at any\ntime.\n\n## Binaries\n\nBinaries and dependency information for Maven, Gradle, Ivy and others can be found at\n[https://central.sonatype.com/search](https://central.sonatype.com/search?namespace=org.mongodb\u0026name=mongodb-driver-sync).\n\nExample for Maven:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.mongodb\u003c/groupId\u003e\n    \u003cartifactId\u003emongodb-driver-sync\u003c/artifactId\u003e\n    \u003cversion\u003ex.y.z\u003c/version\u003e\n\u003c/dependency\u003e\n```\nSnapshot builds are also published regularly via Sonatype.\n\nExample for Maven:\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cname\u003eCentral Portal Snapshots\u003c/name\u003e\n        \u003cid\u003ecentral-portal-snapshots\u003c/id\u003e\n        \u003curl\u003ehttps://central.sonatype.com/repository/maven-snapshots/\u003c/url\u003e\n        \u003creleases\u003e\n            \u003cenabled\u003efalse\u003c/enabled\u003e\n        \u003c/releases\u003e\n        \u003csnapshots\u003e\n            \u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\n## Build\n\nJava 17+ and git is required to build and compile the source. To build and test the driver:\n\n```\n$ git clone --recurse-submodules https://github.com/mongodb/mongo-java-driver.git\n$ cd mongo-java-driver\n$ ./gradlew check\n```\n\nThe test suite requires mongod to be running with [`enableTestCommands`](https://www.mongodb.com/docs/manual/reference/parameters/#param.enableTestCommands), which may be set with the `--setParameter enableTestCommands=1`\ncommand-line parameter:\n```\n$ mkdir -p data/db\n$ mongod --dbpath ./data/db --logpath ./data/mongod.log --port 27017 --logappend --fork --setParameter enableTestCommands=1\n```\n\nIf you encounter `\"Too many open files\"` errors when running the tests then you will need to increase \nthe number of available file descriptors prior to starting mongod as described in [https://www.mongodb.com/docs/manual/reference/ulimit/](https://www.mongodb.com/docs/manual/reference/ulimit/)\n\n## IntelliJ IDEA\n\nA couple of manual configuration steps are required to run the code in IntelliJ:\n\n- Java 17+ is required to build and compile the source.\n\n- **Error:** `java: cannot find symbol: class SNIHostName location: package javax.net.ssl`\u003cbr\u003e\n **Fix:** Settings/Preferences \u003e Build, Execution, Deployment \u003e Compiler \u003e Java Compiler - untick \"Use '--release' option for \n  cross-compilation (Java 9 and later)\"\n\n- **Error:** `java: package com.mongodb.internal.build does not exist`\u003cbr\u003e\n **Fixes:** Any of the following: \u003cbr\u003e\n  - Run the `generateBuildConfig` task: eg: `./gradlew generateBuildConfig` or via Gradle \u003e driver-core \u003e Tasks \u003e buildconfig \u003e\n generateBuildConfig\n  - Set `generateBuildConfig` to execute Before Build. via Gradle \u003e Tasks \u003e buildconfig \u003e right click generateBuildConfig - click on \n   \"Execute Before Build\" \n  - Delegate all build actions to Gradle: Settings/Preferences \u003e Build, Execution, Deployment \u003e Build Tools \u003e Gradle \u003e Build and run \n  using/Run tests using - select \"Gradle\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-java-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fmongo-java-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-java-driver/lists"}