<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:56:25 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-2131] Make all classes referenced by MongoException subclasses implement Serializable</title>
                <link>https://jira.mongodb.org/browse/JAVA-2131</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;p&gt;WriteConcernResult - which is not serializable - is a member of of a serializable exception class, WriteConcernException.  Can we make WriteConcernResult serializable?&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Update&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;In scope of this ticket we will audit all MongoException subclasses and ensure that the object graph for each is completely serializable&lt;/p&gt;</description>
                <environment></environment>
        <key id="269064">JAVA-2131</key>
            <summary>Make all classes referenced by MongoException subclasses implement Serializable</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="10038" iconUrl="https://jira.mongodb.org/images/icons/subtask.gif" description="">Backlog</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="sjungers">Scott Jungers</reporter>
                        <labels>
                    </labels>
                <created>Tue, 1 Mar 2016 14:18:01 +0000</created>
                <updated>Thu, 1 Feb 2024 13:51:42 +0000</updated>
                                                                            <component>Error Handling</component>
                                        <votes>1</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2076648" author="jeff.yemin" created="Fri, 30 Nov 2018 12:55:57 +0000"  >&lt;p&gt;I&apos;m going to repurpose this ticket to require an audit of all classes nested in MongoException and its subclasses.  I suspect WriteConcernResult is not the only offender.&lt;/p&gt;</comment>
                            <comment id="2076646" author="jeff.yemin" created="Fri, 30 Nov 2018 12:54:51 +0000"  >&lt;p&gt;That makes sense.  I think we can do this easily so long as there is not a requirement to support deserialization using a different version of the class. That&apos;s where it starts to get tricky, and buggy.&lt;/p&gt;</comment>
                            <comment id="2076364" author="ips" created="Fri, 30 Nov 2018 04:23:59 +0000"  >&lt;p&gt;We use Jackson for serialization in 90% of our project for the reasons you stated and others, but we use Hazelcast for remote task execution, which uses Java serialization by default. So currently if a&#160;WriteConcernException is thrown by a remote task, it fails to get reported back to the node that initiated the task. On the initiating node, rather than the actual exception, we get an ugly exception about&#160;the exception failing to serialize.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;As antiquated and shitty as Java serialization may be, Java classes, particularly libraries, should still follow its contract. And since Throwable extends Serializable, this means all exceptions should implement the contract of Serializable, which means all non-transient fields on the exception class should also be Serializable.&lt;/p&gt;</comment>
                            <comment id="2075915" author="jeff.yemin" created="Thu, 29 Nov 2018 19:56:44 +0000"  >&lt;p&gt;I&apos;m curious what the need is for your application to serialize exceptions.&#160; Serialization framework has gone out of fashion of late as more and more security issues are found to exploit it.&lt;/p&gt;

&lt;p&gt;See &lt;a href=&quot;https://www.bleepingcomputer.com/news/security/oracle-plans-to-drop-java-serialization-support-the-source-of-most-security-bugs/,&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.bleepingcomputer.com/news/security/oracle-plans-to-drop-java-serialization-support-the-source-of-most-security-bugs/,&lt;/a&gt;&#160;for example.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="2562442">JAVA-5305</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </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|hsixe7:</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>