【问题标题】:Akka.Persistence issues after updating to 1.3.1.0更新到 1.3.1.0 后的 Akka.Persistence 问题
【发布时间】:2017-09-07 22:08:36
【问题描述】:

一切正常……然后我决定将 AKKA.NET 更新到 1.3.1.0……

遇到了很多问题,并解决了它们,但是我似乎无法找到最后一个问题的解决方案(我希望如此)。错误信息:

---> System.Reflection.TargetInvocationException:调用的目标已抛出异常。 ---> System.MissingMethodException:找不到方法:'无效 Akka.Persistence.Sql.Common.Snapshot.QueryConfiguration..ctor(System.String, 系统字符串,系统字符串,系统字符串,系统字符串, System.String、System.String、System.TimeSpan)'。 在 Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore..ctor(配置 配置)

请帮忙。完整的日志如下(将IP替换为XX):

> [ERROR][9/7/2017 1:44:56 PM][Thread 0007][akka://ECHO3DEV/system/akka.persistence.snapshot-store.sql-server] Error while creating actor instance of type Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore with 1 args: (  class : "Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persistence.SqlServer"
  plugin-dispatcher : akka.actor.default-dispatcher
  table-name : _SnapshotStore
  schema-name : dbo
  auto-initialize : on
  connection-string : "Data Source=XX.XX.16.XX;Initial Catalog=ECHO3DEV;Integrated Security=True"
)
Cause: [akka://ECHO3DEV/system/akka.persistence.snapshot-store.sql-server#1885464091]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore with 1 args: (  class : "Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore, Akka.Persistence.SqlServer"
  plugin-dispatcher : akka.actor.default-dispatcher
  table-name : _SnapshotStore
  schema-name : dbo
  auto-initialize : on
  connection-string : "Data Source=XX.XX.16.XX;Initial Catalog=ECHO3DEV;Integrated Security=True"
) ---> **System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void Akka.Persistence.Sql.Common.Snapshot.QueryConfiguration..ctor(System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.TimeSpan)**'.
   at Akka.Persistence.SqlServer.Snapshot.SqlServerSnapshotStore..ctor(Config config)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Akka.Actor.Props.ActivatorProducer.Produce()
   at Akka.Actor.Props.NewActor()
   --- End of inner exception stack trace ---
   at Akka.Actor.Props.NewActor()
   at Akka.Actor.ActorCell.CreateNewActorInstance()
   at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.NewActor()
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)
[ERROR][9/7/2017 1:44:56 PM][Thread 0007][akka://ECHO3DEV/system/akka.persistence.journal.sql-server] Error while creating actor instance of type Akka.Persistence.SqlServer.Journal.SqlServerJournal with 1 args: (  class : "Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.SqlServer"
  plugin-dispatcher : akka.actor.default-dispatcher
  connection-string : "Data Source=XX.XX.16.XX;Initial Catalog=ECHO3DEV;Integrated Security=True"
  connection-timeout : 30s
  schema-name : dbo
  table-name : _EventJournal
  auto-initialize : on
  timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
  metadata-table-name : _Metadata
)
Cause: [akka://ECHO3DEV/system/akka.persistence.journal.sql-server#578824267]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Persistence.SqlServer.Journal.SqlServerJournal with 1 args: (  class : "Akka.Persistence.SqlServer.Journal.SqlServerJournal, Akka.Persistence.SqlServer"
  plugin-dispatcher : akka.actor.default-dispatcher
  connection-string : "Data Source=XX.XX.16.XX;Initial Catalog=ECHO3DEV;Integrated Security=True"
  connection-timeout : 30s
  schema-name : dbo
  table-name : _EventJournal
  auto-initialize : on
  timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
  metadata-table-name : _Metadata
) ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.MissingMethodException: Method not found: 'Void Akka.Persistence.Sql.Common.Journal.QueryConfiguration..ctor(System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.TimeSpan)'.
   at Akka.Persistence.SqlServer.Journal.SqlServerJournal..ctor(Config journalConfig)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at System.Activator.CreateInstance(Type type, Object[] args)
   at Akka.Actor.Props.ActivatorProducer.Produce()
   at Akka.Actor.Props.NewActor()
   --- End of inner exception stack trace ---
   at Akka.Actor.Props.NewActor()
   at Akka.Actor.ActorCell.CreateNewActorInstance()
   at Akka.Actor.ActorCell.<>c__DisplayClass109_0.<NewActor>b__0()
   at Akka.Actor.ActorCell.UseThreadContext(Action action)
   at Akka.Actor.ActorCell.NewActor()
   at Akka.Actor.ActorCell.Create(Exception failure)
   --- End of inner exception stack trace ---
   at Akka.Actor.ActorCell.Create(Exception failure)
   at Akka.Actor.ActorCell. 
 SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

【问题讨论】:

    标签: c# akka.net akka.net-persistence


    【解决方案1】:

    您似乎正在使用Akka.Persistence.SqlServer,它还不是最新的 Akka.Persistence v1.3 - 您可以跟踪here 的进度。

    升级后还需要执行更新脚本,因为将添加新的SerializerId 列,一旦新版本的 Akka.Persistence.SqlServer 准备就绪,它将附加 - 阅读v1.3.1 release notes 了解更多详细信息。

    【讨论】:

    • 那我现在该怎么办?我应该将所有 AKKA.NET 库回滚到旧版本还是只回滚持久性部分?此外,哪个旧版本最强大且最有效?谢谢
    • 对于那些有同样问题的人:转到 Nuget 管理器并将 AKKA.NET 降级到 1.2.3(它将降级所有依赖的包)。此外,如果您使用 Hyperion 序列化程序,请将其降级为 0.92
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-20
    • 2016-11-20
    • 2018-03-07
    • 1970-01-01
    • 2020-01-13
    相关资源
    最近更新 更多