Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3186

Regression upgrading driver from 2.7 to 2.11

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.11.0
    • Fix Version/s: None
    • Component/s: Serialization
    • Labels:
      None
    • Case:

      Description

      I have a project that runs perfectly fine with 2.7 drivers. After upgrading to 2.11 we start getting lots of error with the serializer. As an example these are two classes that we use in the project and that worked perfectly with 2.7 driver but fails to be deserialized with 2.11 driver.

       

      public class ReportConfigurationLayoutSet : DomainEvent
       {
       [JsonConstructor]
       private ReportConfigurationLayoutSet()
       {
       }
      public ReportConfigurationLayoutSet(
       ReportDocumentConfigurationValueObject newLayout,
       ReportDocumentConfigurationValueObject oldLayout
       )
       {
       NewLayout = newLayout ?? throw new ArgumentNullException(nameof(newLayout));
       OldLayout = oldLayout;
       }
      public ReportDocumentConfigurationValueObject NewLayout { get; private set; }
      public ReportDocumentConfigurationValueObject OldLayout { get; private set; }
       }
       
      public class ReportDocumentConfigurationValueObject
       {
       /// <summary>
       /// we assume that we have a list of types of nodes, where a node can be a template to be aggregated to
       /// the docx or a repeated section of template.
       /// for the offer document the repeated sections can be machines, modules inside machines, etc...
       /// </summary>
       public List<ReportConfigurationNodeValueObject> Nodes { get; private set; }
      public ReportConfigurationTypeId ReportTypeId { get; private set; }
      [JsonConstructor]
       private ReportDocumentConfigurationValueObject()
       {
       }
      public ReportDocumentConfigurationValueObject(
       List<ReportConfigurationNodeValueObject> nodes,
       ReportConfigurationTypeId reportTypeId)
       {
       Nodes = nodes ?? throw new ArgumentNullException(nameof(nodes));
       ReportTypeId = reportTypeId ?? throw new ArgumentNullException(nameof(reportTypeId));
       }
      

       

      Upgrading to 2.11 driver I started got this error.

       

       

      An error occurred while deserializing the Events property of class NStore.Domain.Changeset: 
      An error occurred while deserializing the NewLayout property of class ProductsCatalog.Shared.Model.ReportConfiguration.Events.ReportConfigurationLayoutSet: 
      An error occurred while deserializing the Nodes property of class ProductsCatalog.Shared.Model.ReportConfiguration.ReportDocumentConfigurationValueObject: 
      No matching creator found..
      

       

      I do not completely understand why it stopped working and I'm worrying because it worked perfectly with older driver.

       

      Gian Maria.

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmitry.lukyanov Dmitry Lukyanov
              Reporter:
              alkampfer Gian Maria Ricci
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: