<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:51:33 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-119] java driver exception on dbcursor hasnext</title>
                <link>https://jira.mongodb.org/browse/JAVA-119</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;I&apos;m using morphia for object mappings. &lt;br/&gt;
I have no problem inserting objects to database or pulling them via &lt;br/&gt;
the shell. &lt;br/&gt;
When using the java driver both 1.4 and 2.0rc &lt;br/&gt;
For some objects i get the following exception: &lt;br/&gt;
Exception in thread &quot;main&quot; com.mongodb.MongoInternalException: &lt;br/&gt;
couldn&apos;t get next element &lt;br/&gt;
        at com.mongodb.DBCursor.hasNext(DBCursor.java:402) &lt;br/&gt;
        at &lt;br/&gt;
knil.attributeGraphIndexer.postAnalytics.MongoTest.run2(MongoTest.java: &lt;br/&gt;
90) &lt;br/&gt;
        at &lt;br/&gt;
knil.attributeGraphIndexer.postAnalytics.MongoTest.main(MongoTest.java: &lt;br/&gt;
100) &lt;br/&gt;
Caused by: com.mongodb.MongoException: invalid bson? size:134217743 &lt;br/&gt;
remaining: 8077 &lt;br/&gt;
        at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:191) &lt;br/&gt;
        at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:254) &lt;br/&gt;
        at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:235) &lt;br/&gt;
        at com.mongodb.ByteDecoder.readObject(ByteDecoder.java:104) &lt;br/&gt;
        at com.mongodb.DBApiLayer$SingleResult.&amp;lt;init&amp;gt;(DBApiLayer.java:407) &lt;br/&gt;
        at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:299) &lt;br/&gt;
        at com.mongodb.DBCursor._check(DBCursor.java:253) &lt;br/&gt;
        at com.mongodb.DBCursor._hasNext(DBCursor.java:374) &lt;br/&gt;
        at com.mongodb.DBCursor.hasNext(DBCursor.java:399) &lt;br/&gt;
        ... 2 more &lt;/p&gt;

&lt;p&gt;attached is a db with the object&lt;/p&gt;

&lt;p&gt;any ideas what is wrong? &lt;/p&gt;</description>
                <environment>linux ubuntu</environment>
        <key id="12101">JAVA-119</key>
            <summary>java driver exception on dbcursor hasnext</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="9">Done</resolution>
                                        <assignee username="eliot">Eliot Horowitz</assignee>
                                    <reporter username="sirpy">hadar</reporter>
                        <labels>
                    </labels>
                <created>Wed, 9 Jun 2010 02:43:46 +0000</created>
                <updated>Wed, 9 Jun 2010 12:51:28 +0000</updated>
                            <resolved>Wed, 9 Jun 2010 11:32:23 +0000</resolved>
                                    <version>1.4</version>
                                                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="14637" author="eliot" created="Wed, 9 Jun 2010 12:51:28 +0000"  >&lt;p&gt;The shell is handling the corruption better.&lt;br/&gt;
Its not really corruption, its invalid bson&lt;/p&gt;

&lt;p&gt;Can you reproduce this? &lt;br/&gt;
i.e. send the morphia code that generated the problem?&lt;/p&gt;</comment>
                            <comment id="14636" author="sirpy" created="Wed, 9 Jun 2010 12:48:23 +0000"  >&lt;p&gt;well as I reported I originaly inserted the object to the db using a java object via morphia.&lt;br/&gt;
then i did db.tmp.insert(db.objects.findOne(&quot;_id&quot;:&amp;lt;id here&amp;gt;));&lt;br/&gt;
so the tmp db holds only one object. and then I did a dump.&lt;br/&gt;
how can the db be corrupted if I can do db.tmp.find() and it lists the object perfectly.&lt;/p&gt;</comment>
                            <comment id="14634" author="eliot" created="Wed, 9 Jun 2010 11:32:23 +0000"  >&lt;p&gt;the bson you attached is corrupt.&lt;br/&gt;
how did you insert it?&lt;br/&gt;
this certainly isn&apos;t a dbcursor issue at least&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="10235" name="tmp.bson" size="9763" author="sirpy" created="Wed, 9 Jun 2010 02:43:46 +0000"/>
                    </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|hrhd4v:</customfieldvalue>

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