akkadotnet/Akka.Persistence.MySql

create db error

Closed this issue · 2 comments

When I run the application. It always throw this error.
repo: https://github.com/heyixiaoran/AkkaTest/tree/test

[ERROR][2018/11/13 2:36:56][Thread 0004][akka://actor-system/system/akka.persistence.journal.sharding] Error while creating actor instance of type Akka.Persistence.MySql.Journal.MySqlJournal with 1 args: ( class : "Akka.Persistence.MySql.Journal.MySqlJournal, Akka.Persistence.MySql"
plugin-dispatcher : akka.actor.default-dispatcher
connection-string : Server=localhost;Port=3306;Database=akka;Uid=root;Pwd=123456;
connection-timeout : 30s
table-name : sharding_journal
auto-initialize : on
timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
metadata-table-name : sharding_metadata
)
Cause: [akka://actor-system/system/akka.persistence.journal.sharding#777175266]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Persistence.MySql.Journal.MySqlJournal with 1 args: ( class : "Akka.Persistence.MySql.Journal.MySqlJournal, Akka.Persistence.MySql"
plugin-dispatcher : akka.actor.default-dispatcher
connection-string : Server=localhost;Port=3306;Database=akka;Uid=root;Pwd=123456;
connection-timeout : 30s
table-name : sharding_journal
auto-initialize : on
timestamp-provider : "Akka.Persistence.Sql.Common.Journal.DefaultTimestampProvider, Akka.Persistence.Sql.Common"
metadata-table-name : sharding_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.String, System.TimeSpan, System.String)'.
at Akka.Persistence.MySql.Journal.MySqlJournal..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.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][2018/11/13 2:36:56][Thread 0004][akka://actor-system/system/akka.persistence.snapshot-store.sharding] Error while creating actor instance of type Akka.Persistence.MySql.Snapshot.MySqlSnapshotStore with 1 args: ( class : "Akka.Persistence.MySql.Snapshot.MySqlSnapshotStore, Akka.Persistence.MySql"
plugin-dispatcher : akka.actor.default-dispatcher
connection-string : Server=localhost;Port=3306;Database=akka;Uid=root;Pwd=123456;
connection-timeout : 30s
table-name : snapshot_store
auto-initialize : on
)
Cause: [akka://actor-system/system/akka.persistence.snapshot-store.sharding#464385363]: Akka.Actor.ActorInitializationException: Exception during creation ---> System.TypeLoadException: Error while creating actor instance of type Akka.Persistence.MySql.Snapshot.MySqlSnapshotStore with 1 args: ( class : "Akka.Persistence.MySql.Snapshot.MySqlSnapshotStore, Akka.Persistence.MySql"
plugin-dispatcher : akka.actor.default-dispatcher
connection-string : Server=localhost;Port=3306;Database=akka;Uid=root;Pwd=123456;
connection-timeout : 30s
table-name : snapshot_store
auto-initialize : on
) ---> 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.String, System.TimeSpan, System.String)'.
at Akka.Persistence.MySql.Snapshot.MySqlSnapshotStore..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.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)

I use .NET Core . This package need to update to support it and update mysql connector to Pomelo.EntityFrameworkCore.MySql

Because this package has not been maintained in a long time (possibly abandoned) it no longer has binary compatibility with some parts of Akka.NET. We were able to upgrade to 1.3.9 while still using it, with the exception of one package which we left at 1.3.8(?). Would need to check.