<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[JAVA-2026] Use of MongoCredential throws unhandled exceptions on Android</title>
                <link>https://jira.mongodb.org/browse/JAVA-2026</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I am maintaining an open source project which is an android front-end client for Mongo DB (&lt;a href=&quot;https://github.com/grennis/MongoExplorer/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/grennis/MongoExplorer/&lt;/a&gt;). So, hardcoding credentials is not an issue here. The user types in their credentials and database connection information.&lt;/p&gt;

&lt;p&gt;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&apos;m trying to use MongoCredential to authenticate.&lt;/p&gt;

&lt;p&gt;However, it does not seem to work on Android. &lt;/p&gt;

&lt;p&gt;With driver version 3.1.x I get various exceptions, &lt;br/&gt;
  Could not find method java.lang.management.ManagementFactory.getRuntimeMXBean, referenced from method org.bson.types.ObjectId.createProcessIdentifier&lt;br/&gt;
  VFY: unable to resolve static method 24444: Ljava/lang/management/ManagementFactory;.getRuntimeMXBean ()Ljava/lang/management/RuntimeMXBean;&lt;br/&gt;
And then followed by unhandled exception - java.lang.NoClassDefFoundError: java.lang.management.ManagementFactory&lt;/p&gt;

&lt;p&gt;With driver version 2.13.x I get exception similiar exceptions ultimately resulting in: &lt;br/&gt;
  java.lang.VerifyError: com/mongodb/DBPort$PlainAuthenticator&lt;/p&gt;
</description>
                <environment>Android</environment>
        <key id="237664">JAVA-2026</key>
            <summary>Use of MongoCredential throws unhandled exceptions on Android</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="grennis">Greg Ennis</reporter>
                        <labels>
                            <label>Bug</label>
                            <label>android</label>
                    </labels>
                <created>Wed, 4 Nov 2015 01:40:54 +0000</created>
                <updated>Wed, 11 Sep 2019 19:09:32 +0000</updated>
                            <resolved>Wed, 4 Nov 2015 12:41:25 +0000</resolved>
                                    <version>2.13.3</version>
                    <version>3.1.0</version>
                                                    <component>Authentication</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1079140" author="grennis" created="Wed, 4 Nov 2015 12:42:50 +0000"  >&lt;p&gt;Sorry, I somehow didn&apos;t find that issue when I searched. Thanks&lt;/p&gt;</comment>
                            <comment id="1079138" author="jeff.yemin" created="Wed, 4 Nov 2015 12:41:13 +0000"  >&lt;p&gt;Marking as a duplicate of &lt;a href=&quot;https://jira.mongodb.org/browse/JAVA-1958&quot; title=&quot;SCRAM-SHA1 authentication is not available on Android&quot; class=&quot;issue-link&quot; data-issue-key=&quot;JAVA-1958&quot;&gt;&lt;del&gt;JAVA-1958&lt;/del&gt;&lt;/a&gt;.  As I commented on that ticket, we don&apos;t consider this a bug per se as the Java driver is designed to run in a complete Java SE environment, and Android does not provide that.  But still, it&apos;s something that we&apos;ll consider addressing.&lt;/p&gt;</comment>
                            <comment id="1078855" author="grennis" created="Wed, 4 Nov 2015 03:27:45 +0000"  >&lt;p&gt;I&apos;m trying to connect to mongo lab, it reports: mongod version: 3.0.7.&lt;/p&gt;

&lt;p&gt;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&apos;m not sure how it could be maintained going forward.&lt;/p&gt;

</comment>
                            <comment id="1078846" author="jeff.yemin" created="Wed, 4 Nov 2015 03:01:13 +0000"  >&lt;p&gt;Is it possible you&apos;re running into the issue described &lt;a href=&quot;http://stackoverflow.com/questions/32529484/mongodb-3-x-driver-android-compatibility&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;?&lt;/p&gt;</comment>
                            <comment id="1078842" author="jeff.yemin" created="Wed, 4 Nov 2015 02:56:16 +0000"  >&lt;p&gt;What version of MongoDB is the application connecting to?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="229451">JAVA-1958</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hse5hj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>