<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:16 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-2079] collectionExists returns false although collection really exists</title>
                <link>https://jira.mongodb.org/browse/JAVA-2079</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;Called &quot;db.createCollection(COLLECTION_LOGS, options)&quot; throws &quot;CommandFailureException&quot; because COLLECTION_LOGS already exists. &lt;/p&gt;

&lt;p&gt;In the Exception handler the call to &quot;collectionExists&quot; returns false, but the collection really exists:&lt;br/&gt;
// Double check&lt;br/&gt;
if (!db.collectionExists(COLLECTION_LOGS))&lt;/p&gt;
{
                // The collection is not there so it was some other issue
                throw e;
}</description>
                <environment>Server: Ubuntu 14.04 with MongoDB 3.2 &lt;br/&gt;
Client: Mac OS X 10.9 with Java Driver version 3.2 (Java 8) </environment>
        <key id="246085">JAVA-2079</key>
            <summary>collectionExists returns false although collection really exists</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="5">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="fkbecker">Frank Becker</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Jan 2016 11:12:24 +0000</created>
                <updated>Thu, 7 Jan 2016 16:03:51 +0000</updated>
                            <resolved>Thu, 7 Jan 2016 16:03:51 +0000</resolved>
                                    <version>3.2.0</version>
                                                    <component>Query Operations</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="1128662" author="jeff.yemin" created="Thu, 7 Jan 2016 16:03:51 +0000"  >&lt;p&gt;OK, based on your previous comment I&apos;m closing this, but if you are able to reproduce it in the future please comment and we can re-open.&lt;/p&gt;</comment>
                            <comment id="1128599" author="fkbecker" created="Thu, 7 Jan 2016 15:21:14 +0000"  >&lt;p&gt;It&apos;s one standalone MongoDB - extreme minimum installation on Ubuntu14. Just created the /data/db directory and started mongod in the Terminal. So it&apos;s the smallest thing you can do I think. I also only use one server address, but have three databases open in parallel (data, logs and configuration)&lt;/p&gt;

&lt;p&gt;What (and why) I did:&lt;br/&gt;
I have a server and at least one client Tomcat server that communicate over the MongoDB. I used MongoDB 2.6 through to 3.0.8 with Java driver version 2.12.2&lt;br/&gt;
Another developer installed MongoDB 3.2 and experienced connection problems when the server or client started and the collection exists. &lt;br/&gt;
So I checked the compatibility matrix and upgraded to Java driver 3.2.0: switched the exception (MongoCommandException -&amp;gt;  CommandFailureException) debugged the code and it gave me the issue when tried to connect to server 3.2. Using a server 3.0.8 everything worked. That&apos;s why I created the ticket.   &lt;/p&gt;</comment>
                            <comment id="1128557" author="jeff.yemin" created="Thu, 7 Jan 2016 14:53:19 +0000"  >&lt;p&gt;Hi Frank,&lt;/p&gt;

&lt;p&gt;Before we close this out, please let me know:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;are you connected to a sharded cluster, a replica set, or a standalone MongoDB cluster?&lt;/li&gt;
	&lt;li&gt;How many server addresses are in the seed list that you create your MongoClient instance with?&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="1128551" author="fkbecker" created="Thu, 7 Jan 2016 14:50:24 +0000"  >&lt;p&gt;I am sorry. &lt;/p&gt;

&lt;p&gt;I tried to create a &quot;minimum example&quot; to reproduce - but this one worked as it should. So I wiped my Maven .m2 repository and all the target directories and re-run Maven on my project. Now my project also worked as it should. Maybe there were some old libs of the former driver left somewhere in the build path. &lt;/p&gt;

&lt;p&gt;I can&apos;t reproduce any longer and apologise. Can be closed.&lt;/p&gt;</comment>
                            <comment id="1128489" author="ross@10gen.com" created="Thu, 7 Jan 2016 13:36:45 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=fkbecker&quot; class=&quot;user-hover&quot; rel=&quot;fkbecker&quot;&gt;fkbecker&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;That sounds off, can you provide the following:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;The full &lt;tt&gt;CommandFailureException&lt;/tt&gt; message&lt;/li&gt;
	&lt;li&gt;The value of &lt;tt&gt;COLLECTION_LOGS&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;The value of &lt;tt&gt;options&lt;/tt&gt;&lt;/li&gt;
	&lt;li&gt;The output from running &lt;tt&gt;db.&amp;lt;collectionName&amp;gt;.stats()&lt;/tt&gt; from the shell&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;With that information we should be able to ascertain what is happening in this case.&lt;/p&gt;

&lt;p&gt;Ross&lt;/p&gt;</comment>
                    </comments>
                    <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|hsfa7z:</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>