<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 09:02:38 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-4653] ZonedDateTime --&gt; unable to use Codec</title>
                <link>https://jira.mongodb.org/browse/JAVA-4653</link>
                <project id="10006" key="JAVA">Java Driver</project>
                    <description>&lt;h4&gt;&lt;a name=&quot;Summary&quot;&gt;&lt;/a&gt;Summary&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;ZonedDateTime failure while reading data from mongo.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/MorphiaOrg/morphia/issues/1922&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/MorphiaOrg/morphia/issues/1922&lt;/a&gt; (Discussion details available here)&lt;/p&gt;
&lt;h4&gt;&lt;a name=&quot;MongoDB%3A4.2&quot;&gt;&lt;/a&gt;MongoDB: 4.2&lt;/h4&gt;

&lt;p&gt;Mongo Driver: 3.11.2&lt;/p&gt;

&lt;p&gt;Morphia:2.2.3&lt;/p&gt;

&lt;p&gt;&#160;&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;Create Mongo Entity with ZonedDateTime field with it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Try to save ZonedDatetime as String and then read it back from Database.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Exception:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;org.bson.codecs.configuration.CodecConfigurationException: An exception occurred when decoding using the AutomaticPojoCodec. Decoding into a &apos;ZonedDateTime&apos; failed with the following exception: Cannot find a public constructor for &apos;ZonedDateTime&apos;. A custom Codec or PojoCodec may need to be explicitly configured and registered to handle this type. at org.bson.codecs.pojo.AutomaticPojoCodec.decode(AutomaticPojoCodec.java:40) at org.bson.codecs.DecoderContext.decodeWithChildContext(DecoderContext.java:96) at dev.morphia.mapping.codec.pojo.EntityDecoder.decodeModel(EntityDecoder.java:59) at dev.morphia.mapping.codec.pojo.EntityDecoder.decodeProperties(EntityDecoder.java:80) at dev.morphia.mapping.codec.pojo.EntityDecoder.decode(EntityDecoder.java:35) at dev.morphia.mapping.codec.pojo.MorphiaCodec.decode(MorphiaCodec.java:71) at dev.morphia.mapping.codec.pojo.EntityDecoder.decode(EntityDecoder.java:40) at dev.morphia.mapping.codec.pojo.MorphiaCodec.decode(MorphiaCodec.java:71) at com.mongodb.internal.operation.CommandResultArrayCodec.decode(CommandResultArrayCodec.java:52) at com.mongodb.internal.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:60) at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:87) at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:42) at org.bson.internal.LazyCodec.decode(LazyCodec.java:48) at org.bson.codecs.BsonDocumentCodec.readValue(BsonDocumentCodec.java:104) at com.mongodb.internal.operation.CommandResultDocumentCodec.readValue(CommandResultDocumentCodec.java:63) at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:87) at org.bson.codecs.BsonDocumentCodec.decode(BsonDocumentCodec.java:42) at com.mongodb.internal.connection.ReplyMessage.&amp;lt;init&amp;gt;(ReplyMessage.java:51) at com.mongodb.internal.connection.InternalStreamConnection.getCommandResult(InternalStreamConnection.java:540) at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:425) at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:342) at com.mongodb.internal.connection.UsageTrackingInternalConnection.sendAndReceive(UsageTrackingInternalConnection.java:116) at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.sendAndReceive(DefaultConnectionPool.java:647) at com.mongodb.internal.connection.CommandProtocolImpl.execute(CommandProtocolImpl.java:71) at com.mongodb.internal.connection.DefaultServer$DefaultServerProtocolExecutor.execute(DefaultServer.java:244) at com.mongodb.internal.connection.DefaultServerConnection.executeProtocol(DefaultServerConnection.java:227) at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:127) at com.mongodb.internal.connection.DefaultServerConnection.command(DefaultServerConnection.java:117) at com.mongodb.internal.connection.DefaultServer$OperationCountTrackingConnection.command(DefaultServer.java:348) at com.mongodb.internal.operation.CommandOperationHelper.createReadCommandAndExecute(CommandOperationHelper.java:228) at com.mongodb.internal.operation.FindOperation.lambda$execute$1(FindOperation.java:666) at com.mongodb.internal.operation.OperationHelper.lambda$withSourceAndConnection$2(OperationHelper.java:564) at com.mongodb.internal.operation.OperationHelper.withSuppliedResource(OperationHelper.java:589) at com.mongodb.internal.operation.OperationHelper.lambda$withSourceAndConnection$3(OperationHelper.java:563) at com.mongodb.internal.operation.OperationHelper.withSuppliedResource(OperationHelper.java:589) at com.mongodb.internal.operation.OperationHelper.withSourceAndConnection(OperationHelper.java:562) at com.mongodb.internal.operation.FindOperation.lambda$execute$2(FindOperation.java:661) at com.mongodb.internal.async.function.RetryingSyncSupplier.get(RetryingSyncSupplier.java:65) at com.mongodb.internal.operation.FindOperation.execute(FindOperation.java:692) at com.mongodb.internal.operation.FindOperation.execute(FindOperation.java:86) at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:191) at com.mongodb.client.internal.MongoIterableImpl.execute(MongoIterableImpl.java:135) at com.mongodb.client.internal.MongoIterableImpl.iterator(MongoIterableImpl.java:92) at dev.morphia.query.MorphiaQuery.prepareCursor(MorphiaQuery.java:321) at dev.morphia.query.MorphiaQuery.iterator(MorphiaQuery.java:200) at com.ghx.data.mongo.EmployeeDAO.findAll(QuickTourTest.java:397) at com.ghx.data.mongo.QuickTourTest.demo(QuickTourTest.java:149) Caused by: org.bson.codecs.configuration.CodecConfigurationException: Cannot find a public constructor for &apos;ZonedDateTime&apos;. at org.bson.codecs.pojo.CreatorExecutable.checkHasAnExecutable(CreatorExecutable.java:140) at org.bson.codecs.pojo.CreatorExecutable.getInstance(CreatorExecutable.java:107) at org.bson.codecs.pojo.InstanceCreatorImpl.&amp;lt;init&amp;gt;(InstanceCreatorImpl.java:40) at org.bson.codecs.pojo.InstanceCreatorFactoryImpl.create(InstanceCreatorFactoryImpl.java:28) at org.bson.codecs.pojo.ClassModel.getInstanceCreator(ClassModel.java:75) at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:102) at org.bson.codecs.pojo.PojoCodecImpl.decode(PojoCodecImpl.java:107) at org.bson.codecs.pojo.AutomaticPojoCodec.decode(AutomaticPojoCodec.java:37) .&lt;/em&gt;&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;Please provide any additional background information that may be helpful in diagnosing the bug.&lt;/em&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="2071483">JAVA-4653</key>
            <summary>ZonedDateTime --&gt; unable to use Codec</summary>
                <type id="6" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14720&amp;avatarType=issuetype">Question</type>
                                            <priority id="10300" iconUrl="https://jira.mongodb.org/images/icons/priorities/medium.svg">Unknown</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="jeff.yemin@mongodb.com">Jeffrey Yemin</assignee>
                                    <reporter username="arivazhagan.jeganathan@gmail.com">Arivazhagan Jeganathan</reporter>
                        <labels>
                    </labels>
                <created>Fri, 17 Jun 2022 14:38:31 +0000</created>
                <updated>Wed, 22 Jun 2022 15:24:19 +0000</updated>
                            <resolved>Tue, 21 Jun 2022 18:04:36 +0000</resolved>
                                                                    <component>POJO</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4630003" author="jeff.yemin" created="Tue, 21 Jun 2022 18:04:36 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=arivazhagan.jeganathan%40gmail.com&quot; class=&quot;user-hover&quot; rel=&quot;arivazhagan.jeganathan@gmail.com&quot;&gt;arivazhagan.jeganathan@gmail.com&lt;/a&gt; I&apos;m going to close this as Won&apos;t Fix since it was originally opened as a bug, and it&apos;s been determined that the underlying issue is actually a breaking change in Morphia 2.0.&lt;/p&gt;

&lt;p&gt;If you&apos;d like us to consider adding a Codec for ZonedDateTime to the driver as a convenience, please open a new issue, but note there is no guarantee that the codec that we might introduce would be compatible with the one in Morphia 1.x.&lt;/p&gt;</comment>
                            <comment id="4624389" author="JIRAUSER1269844" created="Fri, 17 Jun 2022 17:15:13 +0000"  >&lt;p&gt;Thank you @Jeffrey.. Much appreciated.&lt;/p&gt;</comment>
                            <comment id="4623798" author="jeff.yemin" created="Fri, 17 Jun 2022 14:53:05 +0000"  >&lt;p&gt;I left a comment on &lt;a href=&quot;https://github.com/MorphiaOrg/morphia/issues/1922&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/MorphiaOrg/morphia/issues/1922&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="385514" name="Converter logic used in 1.x morphia.png" size="38163" author="JIRAUSER1269790" created="Fri, 17 Jun 2022 14:40:17 +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|i0hyc8:</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>