此平台不支持Apache Ignite .NET序列化委托

时间:2017-11-15 15:02:21

标签: .net-core ignite

在点燃here时询问有关安排作业的问题。

使用简单的文本输出到控制台并通过HttpClient通过简单的异步Web请求对其进行测试。工作良好。

实现了具有大量长时间运行任务和并行计算的实际业务逻辑。

Ignite .NET版本:2.3.0

应用平台:dotnet core 2.0

但是使用DeployClusterSingleton收到服务注册的例外情况。

  

System.Runtime.Serialization.SerializationException:'序列化   这个平台不支持代表。'

来源:System.Private.CoreLib

   at System.MulticastDelegate.GetObjectData(SerializationInfo info, StreamingContext context)
   at Apache.Ignite.Core.Impl.Binary.SerializableSerializer.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryUtils.WriteArray(Array val, BinaryWriter ctx, Nullable`1 elemTypeId)
   at Apache.Ignite.Core.Impl.Binary.BinarySystemHandlers.WriteArray(BinaryWriter ctx, Object obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Binary.BinaryReflectiveSerializerInternal.Apache.Ignite.Core.Impl.Binary.IBinarySerializerInternal.WriteBinary[T](T obj, BinaryWriter writer)
   at Apache.Ignite.Core.Impl.Binary.BinaryWriter.Write[T](T obj)
   at Apache.Ignite.Core.Impl.Services.Services.<>c__DisplayClass3.<DeployMultiple>b__2(BinaryWriter w)
   at Apache.Ignite.Core.Impl.PlatformTargetAdapter.WriteToStream(Action`1 action, IBinaryStream stream, Marshaller marsh)
   at Apache.Ignite.Core.Impl.PlatformJniTarget.InStreamOutStream[TR](Int32 type, Action`1 writeAction, Func`2 readAction)
   at Apache.Ignite.Core.Impl.Services.Services.DeployMultiple(String name, IService service, Int32 totalCount, Int32 maxPerNodeCount)
   at Apache.Ignite.Core.Impl.Services.Services.DeployClusterSingleton(String name, IService service)

很难猜到,造成这种情况的代码部分。我所要做的就是逐个部分替换代码。

如果需要更多详细信息,我可以提供其他信息。

经过调查:

IOptions<>ILogger<>

下一个是来自System.PlatformNotSupportedException: 'Operation is not supported on this platform.'

System.Reflection.RuntimePropertyInfo.GetObjectData(SerializationInfo info, StreamingContext context)

另一个是:Apache.Ignite.Core.Binary.BinaryObjectException: 'Conflicting field IDs [type=HttpClient, field1=_disposed, field2=_disposed, fieldId=375705476]'

遗憾的是,由于这个原因,我不得不改变架构;

1 个答案:

答案 0 :(得分:5)

此异常是由.NET Core引起的,does not support delegate serialization。 Ignite只需调用标准GetObjectData方法。

这可以在正常的.NET 4 +下工作。

您的服务类是否包含任何代理?