Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-5320

Error in protobuf marshalling of Date for MongoDB persistence.

    XMLWordPrintable

Details

    Description

      Create a Model with Date and use it in the service to recreate this issue or use the example kogito-travel-agency.
      Getting below error while marshalling process instance when persisting in to mongodb.

      Caused by: java.lang.ExceptionInInitializerError
      	at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceWriter.writeProcessInstance(ProtobufProcessInstanceWriter.java:152)
      	at org.kie.kogito.serialization.process.impl.ProtobufProcessInstanceMarshaller.writeProcessInstance(ProtobufProcessInstanceMarshaller.java:39)
      	at org.kie.kogito.serialization.process.ProcessInstanceMarshallerService.marshallProcessInstance(ProcessInstanceMarshallerService.java:108)
      	at org.kie.kogito.mongodb.MongoDBProcessInstances.updateStorage(MongoDBProcessInstances.java:97)
      	at org.kie.kogito.mongodb.MongoDBProcessInstances.create(MongoDBProcessInstances.java:87)
      
      

      and the root cause in the json transformation

      Caused by: java.lang.RuntimeException: Conversion protostream protobuf type not possible
      	at org.kie.kogito.serialization.process.protobuf.ProtostreamProtobufAdapterTypeProvider.descriptors(ProtostreamProtobufAdapterTypeProvider.java:57)
      	at org.kie.kogito.serialization.process.protobuf.ProtobufTypeRegistryFactory.<init>(ProtobufTypeRegistryFactory.java:38)
      	at org.kie.kogito.serialization.process.protobuf.ProtobufTypeRegistryFactory.<clinit>(ProtobufTypeRegistryFactory.java:30)
      	... 
      Caused by: com.google.protobuf.Descriptors$DescriptorValidationException: org.kie.kogito.app.Flight.arrival: "kogito.Date" is not defined.
      	at com.google.protobuf.Descriptors$DescriptorPool.lookupSymbol(Descriptors.java:2445)
      	at com.google.protobuf.Descriptors$FieldDescriptor.crossLink(Descriptors.java:1460)
      

      Attachments

        Activity

          People

            uegozi@redhat.com Ute Egozi (Inactive)
            swkale Swati Kale
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: