[JAVA-2026] Use of MongoCredential throws unhandled exceptions on Android Created: 04/Nov/15 Updated: 11/Sep/19 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Authentication |
| Affects Version/s: | 2.13.3, 3.1.0 |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Greg Ennis | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | Bug, android | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Android |
||
| Issue Links: |
|
||||||||
| Description |
|
I am maintaining an open source project which is an android front-end client for Mongo DB (https://github.com/grennis/MongoExplorer/). So, hardcoding credentials is not an issue here. The user types in their credentials and database connection information. I have been using deprecated authentication mechanism MongoDatabase.authenticate(...) and it does work in most scenarios, however, it seems to no longer work (with MongoLab at least). So, I'm trying to use MongoCredential to authenticate. However, it does not seem to work on Android. With driver version 3.1.x I get various exceptions, With driver version 2.13.x I get exception similiar exceptions ultimately resulting in: |
| Comments |
| Comment by Greg Ennis [ 04/Nov/15 ] |
|
Sorry, I somehow didn't find that issue when I searched. Thanks |
| Comment by Jeffrey Yemin [ 04/Nov/15 ] |
|
Marking as a duplicate of |
| Comment by Greg Ennis [ 04/Nov/15 ] |
|
I'm trying to connect to mongo lab, it reports: mongod version: 3.0.7. That stack overflow link does appear to be the same issue (missing Sasl classes) but the suggested solution is to use an unofficial fork from a couple months ago, it is now 93 commits behind your master and I'm not sure how it could be maintained going forward. |
| Comment by Jeffrey Yemin [ 04/Nov/15 ] |
|
Is it possible you're running into the issue described here? |
| Comment by Jeffrey Yemin [ 04/Nov/15 ] |
|
What version of MongoDB is the application connecting to? |