Search code examples
c#.net-coreignite

Apache Ignite:No matching type found for object NonRandomizedStringEqualityComparer on cache.Get from .net framework app


I am using Apache ignite version 2.7.5. and using .net core as server and thin client. Cache configuration with key as string and value as Model class for example Employee.And this model class having properties including dictionary data type fields.

I am performing get and put record into cache from application which having target platform is .net framework.

In my .net core(v2.2.103) client Load() method returning result but in caller application getting the following exception.

{"No matching type found for object [typeId=596790889, typeName=System.Collections.Generic.NonRandomizedStringEqualityComparer]. This usually indicates that assembly with specified type is not loaded on a node. When using Apache.Ignite.exe, make sure to load assemblies with -assembly parameter. Alternatively, set IgniteConfiguration.PeerAssemblyLoadingEnabled to true."}

Any one can you give suggestion,how to solve this exception.


Solution

  • I think you have mismatch of .Net versions - one uses NonRandomizedStringEqualityComparer as comparer for its dictionaries, which other one does not have this type.

    Please see this related .Net core bug: https://github.com/dotnet/corefx/issues/26033

    It is possible that Ignite handles such dictionaries incorrectly on its own, but I'm not sure what are steps to reproduce. Right now the recommendation is to make sure you're using exactly the same verison of .Net runtime everywhere.