Apache Ignite查询-找不到对象的匹配类型

时间:2018-11-07 13:13:45

标签: ignite

从apache点燃缓存查询缓存键时,出现“找不到对象的匹配类型”错误。

Ignite服务器实例在Linux Server上运行,而我的查询在由Microsoft Server .Net Web窗体应用程序启动的ignite客户端实例上运行。此类型的dll已存在于应用程序的bin文件夹中。

我的查询

List<string> cacheKeys = cache.Select(e => e.Key).Where(e => e.StartsWith(cacheItemKeyPrefix)).ToList();

错误:

Apache.Ignite.Core.Binary.BinaryObjectException:在Apache.Ignite上找不到对象[typeId = -274908056,typeName = System.Collections.Generic.Dictionary 2[[System.Decimal],[CUST.CompositionTypes.PrivateBankingCustomer]]]. 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. 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.Cache.CacheEnumerator 2.b__0(IBinaryStream流)的匹配类型。 .Core.Impl.PlatformJniTarget.OutStream [T](Int32类型,函数2 readAction) at Apache.Ignite.Core.Impl.Cache.CacheEnumeratorProxy 2.MoveNext()在System.Linq.Enumerable.WhereSelectEnumerableIterator 2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator 1.MoveNext()在System.Collections.Generic .List 1..ctor(IEnumerable 1集合)位于System.Linq.Enumerable.ToList [TSource](IEnumerable`1源)

1 个答案:

答案 0 :(得分:0)

如果整个群集都是.Net群集(包括服务器节点),则只能远程运行.Net闭包。如果已经存在,我建议Windows和Linux程序集之间有些不匹配。

您是否在Linux节点的程序集中输入PrivateBankingCustomer?请注意,缓存键/值类型不能被对等程序集加载。