<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:47:42 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>[CSHARP-4260] Cannot use element name because it is already being used by property</title>
                <link>https://jira.mongodb.org/browse/CSHARP-4260</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;The code that has been working for years suddenly started throwing BsonSerializationException after upgrade. Many of our classes simply won&apos;t serialize anymore. The details can be found in the additional information section.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The errors we get are similar to: MongoDB.Bson.BsonSerializationException: The property &apos;DateCreatedUtc&apos; of type &apos;HtComm.Domain.Events.Settings.ThemeSettings&apos; cannot use element name &apos;DateCreatedUtc&apos; because it is already being used by property &apos;DateCreatedUtc&apos;. at MongoDB.Bson.Serialization.BsonClassMap.Freeze() at MongoDB.Bson.Serialization.BsonClassMap.LookupClassMap(Type classType) at MongoDB.Bson.Serialization.BsonClassMapSerializationProvider.GetSerializer(Type type, IBsonSerializerRegistry serializerRegistry)&lt;/em&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Or:&lt;/em&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;There was an error getting Appearance settings.Exception: MongoDB.Bson.BsonSerializationException: Creator map for class HtComm.Domain.Events.Settings.ThemeSettings has 3 arguments, but none are configured. at MongoDB.Bson.Serialization.BsonCreatorMap.Freeze() at MongoDB.Bson.Serialization.BsonClassMap.Freeze()&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;Environment&quot;&gt;&lt;/a&gt;Environment&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Please provide the version of the C / CXX driver. &lt;span class=&quot;error&quot;&gt;&amp;#91;V2.16.1&amp;#93;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Please provide the host OS, version, and architecture (example: Windows 10 64-bit x86). Linux (MongoDB hosted cluster)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Please provide the C / CXX compiler and version. .NET 6.0&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If applicable, please attach the full output of the cmake command used to configure the C / CXX driver.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster). replica set&lt;/em&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;HowtoReproduce&quot;&gt;&lt;/a&gt;How to Reproduce&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Steps to reproduce. If possible, please include a &lt;a href=&quot;http://sscce.org/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Short, Self Contained, Correct (Compilable), Example&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This example here clearly identifies what we are running into.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://www.codewrecks.com/post/general/error-in-mongodb-serializer/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.codewrecks.com/post/general/error-in-mongodb-serializer/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I can also provide additional Gists if needed&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;AdditionalBackground&quot;&gt;&lt;/a&gt;Additional Background&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;We were on version 2.11.6 and hadn&apos;t upgraded the nuget packages to the latest. Upon upgrading to the latest, i.e. 2.16.1, we started noticing a lot of serialization errors related to BsonClassMap.Freeze() After checking the logs, the exact version where these errors started is 2.12.0. Many of the erroring classes compile fine on 2.11.6, but fail starting 2.12.0.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2092306">CSHARP-4260</key>
            <summary>Cannot use element name because it is already being used by property</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</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="13203">Gone away</resolution>
                                        <assignee username="dmitry.lukyanov@mongodb.com">Dmitry Lukyanov</assignee>
                                    <reporter username="anup@hypertrends.com">Anup Marwadi</reporter>
                        <labels>
                    </labels>
                <created>Mon, 18 Jul 2022 08:52:13 +0000</created>
                <updated>Fri, 27 Oct 2023 19:56:02 +0000</updated>
                            <resolved>Fri, 5 Aug 2022 12:00:37 +0000</resolved>
                                                                    <component>Serialization</component>
                                        <votes>0</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="4730742" author="dbeng-pm-bot" created="Fri, 5 Aug 2022 12:00:39 +0000"  >&lt;p&gt;There hasn&apos;t been any recent activity on this ticket, so we&apos;re resolving it. Thanks for reaching out! Please feel free to comment on this if you&apos;re able to provide more information.&lt;/p&gt;</comment>
                            <comment id="4695197" author="dmitry.lukyanov" created="Thu, 21 Jul 2022 15:03:25 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=anup%40hypertrends.com&quot; class=&quot;user-hover&quot; rel=&quot;anup@hypertrends.com&quot;&gt;anup@hypertrends.com&lt;/a&gt; for your report, can you please provide a reproduction of your case, the link your provided contains a different case.&lt;/p&gt;</comment>
                            <comment id="4685028" author="anup@hypertrends.com" created="Mon, 18 Jul 2022 08:55:07 +0000"  >&lt;p&gt;It should be noted that majority of these errors go away when the property setters are made public instead of private or protected. While this is inconvenient and breaks encapsulation in our code designs, we have been able to at least spend a few days to identify impacted areas and fix&lt;/p&gt;

&lt;p&gt;&#160;&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|i0lhj4:</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>