[
https://issues.apache.org/jira/browse/IGNITE-17299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17567976#comment-17567976
]
Pavel Tupitsyn edited comment on IGNITE-17299 at 7/18/22 1:00 PM:
------------------------------------------------------------------
I've reproduced the problem, thanks for the report.
It is indeed a bug in Ignite, another corner case with *ISerializable*
mechanism where *OrdinalIgnoreCaseComparer* is *ISerializable* and writes as
*OrdinalComparer* which is NOT *ISerializable*.
Unfortunately, I see no workarounds (other than changing the application code
to avoid storing JArray and JObject in Ignite, which I would actually
recommend). We'll fix this for the next release.
was (Author: ptupitsyn):
I've reproduced the problem, thanks for the report.
It is indeed a bug in Ignite, another corner case with *ISerializable*
mechanism where *OrdinalIgnoreCaseComparer* is *ISerializable* and writes as
*OrdinalComparer* which is NOT *ISerializable*.
Unfortunately, I see no workarounds. We'll fix this for the next release.
> .NET: The constructor to deserialize an object of type
> 'System.OrdinalCaseSensitiveComparer' was not found
> ----------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-17299
> URL: https://issues.apache.org/jira/browse/IGNITE-17299
> Project: Ignite
> Issue Type: Bug
> Components: platforms
> Affects Versions: 2.13
> Environment: NET 5.0, Apache Ignite 2.13, Newtonsoft.Json 13.0.1
> Reporter: Vadim Alekseev
> Assignee: Pavel Tupitsyn
> Priority: Major
> Labels: .NET
> Fix For: 2.14
>
>
> We have a model created with Nswag. The model has additional properties, by
> which all unknown fields are parsed.
> {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 the nested model is saved in additional properties, it is saved as
> KeyValuePair<string, object>. The object is a JArray containing 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.*
>
> Stack Trace:
> {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)