Vadim Alekseev created IGNITE-17299:
---------------------------------------

             Summary: Error deserialization cache object 
                 Key: IGNITE-17299
                 URL: https://issues.apache.org/jira/browse/IGNITE-17299
             Project: Ignite
          Issue Type: Bug
          Components: binary, cache
    Affects Versions: 2.13
         Environment: NET 5.0, Apache Ignite 2.13
            Reporter: Vadim Alekseev


We have a model generated with Nswag. The model has additional properties to 
which all unknown fields are parsed.

Realization:
{code:java}
private System.Collections.Generic.IDictionary<string, object> 
_additionalProperties = new System.Collections.Generic.Dictionary<string, 
object>();

[Newtonsoft.Json.JsonExtensionData]
public System.Collections.Generic.IDictionary<string, object> 
AdditionalProperties
{
    get { return _additionalProperties; }
    set { _additionalProperties = value; }
} {code}
If nested model is saved in additional properties, it is saved as 
KeyValuePair<string, object>. The object is a JArray that contains a JObject.

When writing data to the cache, everything is fine. But when retrieving data 
from the cache an error occurs: 

 
  *The constructor to deserialize an object of type 
'System.OrdinalCaseSensitiveComparer' was not found.*
StackTrace:
{code:java}
   at 
Apache.Ignite.Core.Impl.Common.SerializableTypeDescriptor.get_SerializationCtorUninitialized()
   at 
Apache.Ignite.Core.Impl.Binary.SerializableSerializer.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at 
Apache.Ignite.Core.Impl.Binary.SerializableSerializer.ReadSerializationInfo(BinaryReader
 reader, IEnumerable`1 fieldNames, Type type, ICollection`1 dotNetFields)   at 
Apache.Ignite.Core.Impl.Binary.SerializableSerializer.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at lambda_method1688(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at lambda_method1682(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at lambda_method1293(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryUtils.ReadArray[T](BinaryReader ctx, 
Boolean typed)   at lambda_method1294(Closure , BinaryReader , Boolean )   at 
Apache.Ignite.Core.Impl.Binary.BinaryUtils.ReadTypedArray(BinaryReader ctx, 
Boolean typed, Type elementType)   at 
Apache.Ignite.Core.Impl.Binary.BinarySystemHandlers.ReadArray(BinaryReader ctx, 
Type type)   at 
Apache.Ignite.Core.Impl.Binary.BinarySystemHandlers.TryReadSystemType[T](Byte 
typeId, BinaryReader ctx, T& res)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at 
Apache.Ignite.Core.Impl.Binary.SerializableSerializer.ReadSerializationInfo(BinaryReader
 reader, IEnumerable`1 fieldNames, Type type, ICollection`1 dotNetFields)   at 
Apache.Ignite.Core.Impl.Binary.SerializableSerializer.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at lambda_method1660(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryUtils.ReadArray[T](BinaryReader ctx, 
Boolean typed)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.<>c__66`1.<ReadArray>b__66_0(BinaryReader
 r)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.<>c__DisplayClass99_0`1.<Read>b__0()
   at Apache.Ignite.Core.Impl.Binary.BinaryReader.Read[T](Func`1 readFunc, Byte 
expHdr)   at Apache.Ignite.Core.Impl.Binary.BinaryReader.Read[T](Func`2 
readFunc, Byte expHdr)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadField[T](String fieldName, 
Func`2 readFunc, Byte expHdr)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadArray[T](String fieldName)   at 
lambda_method1244(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadObject[T](String fieldName)  
 at lambda_method1178(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryUtils.ReadArray[T](BinaryReader ctx, 
Boolean typed)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.<>c__66`1.<ReadArray>b__66_0(BinaryReader
 r)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.<>c__DisplayClass99_0`1.<Read>b__0()
   at Apache.Ignite.Core.Impl.Binary.BinaryReader.Read[T](Func`1 readFunc, Byte 
expHdr)   at Apache.Ignite.Core.Impl.Binary.BinaryReader.Read[T](Func`2 
readFunc, Byte expHdr)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadField[T](String fieldName, 
Func`2 readFunc, Byte expHdr)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadArray[T](String fieldName)   at 
lambda_method1170(Closure , Object , IBinaryReader )   at 
Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.ReadBinary[T](BinaryReader
 reader, IBinaryTypeDescriptor desc, Int32 pos, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadFullObject[T](Int32 pos, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& res, Type 
typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.BinaryReader.ReadBinaryObject[T](Boolean 
doDetach)   at Apache.Ignite.Core.Impl.Binary.BinaryReader.TryDeserialize[T](T& 
res, Type typeOverride)   at 
Apache.Ignite.Core.Impl.Binary.BinaryReader.Deserialize[T](Type typeOverride)   
at Apache.Ignite.Core.Impl.Binary.Marshaller.Unmarshal[T](IBinaryStream stream, 
BinaryMode mode, BinaryObjectBuilder builder)   at 
Apache.Ignite.Core.Impl.Binary.Marshaller.Unmarshal[T](IBinaryStream stream, 
Boolean keepBinary)   at 
Apache.Ignite.Core.Impl.Client.Cache.CacheClient`2.UnmarshalNotNull[T](ClientResponseContext
 ctx)   at 
Apache.Ignite.Core.Impl.Client.Cache.CacheClient`2.<Get>b__14_0(ClientResponseContext
 ctx)   at 
Apache.Ignite.Core.Impl.Client.ClientSocket.DecodeResponse[T](BinaryHeapStream 
stream, Func`2 readFunc, Func`3 errorFunc)   at 
Apache.Ignite.Core.Impl.Client.ClientSocket.DoOutInOp[T](ClientOp opId, 
Action`1 writeAction, Func`2 readFunc, Func`3 errorFunc)   at 
Apache.Ignite.Core.Impl.Client.ClientFailoverSocket.DoOutInOpAffinity[T,TKey](ClientOp
 opId, Action`1 writeAction, Func`2 readFunc, Int32 cacheId, TKey key, Func`3 
errorFunc)   at 
Apache.Ignite.Core.Impl.Client.Cache.CacheClient`2.DoOutInOpAffinity[T](ClientOp
 opId, TK key, Func`2 readFunc)   at 
Apache.Ignite.Core.Impl.Client.Cache.CacheClient`2.Get(TK key)   at 
ApacheIgniteTestConsoleApp.IgniteCacheProvider.GetCachedOrLoad[T](String tag, 
Object cacheKey, Func`1 cacheMissFunc, TimeSpan expirationTime, Int64 
cacheSize) in    cache.Get(cacheKey); {code}
Is there a solution to this problem?
 
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to