Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading some stuff #5

Open
OKTAYKIR opened this issue May 15, 2020 · 3 comments
Open

Upgrading some stuff #5

OKTAYKIR opened this issue May 15, 2020 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@OKTAYKIR
Copy link
Owner

@suadev, I get the following error after running the application:

12:17:48:558 [Debug]: Execution of command 'ExampleCommand' with ID 'command-a478d189-d908-4bb9-918f-c7507b1eb9ee' on aggregate 'EventFlowExample.Aggregates.ExampleAggregate' failed due to exception 'TypeInitializationException' with message: The type initializer for 'MongoDB.Bson.Serialization.BsonClassMap' threw an exception. - System.TypeInitializationException: The type initializer for 'MongoDB.Bson.Serialization.BsonClassMap' threw an exception.
 ---> System.ArgumentNullException: Value cannot be null. (Parameter 'type')
   at System.Reflection.IntrospectionExtensions.GetTypeInfo(Type type)
   at MongoDB.Bson.Serialization.BsonClassMap..cctor()
   --- End of inner exception stack trace ---
   at MongoDB.Bson.Serialization.BsonClassMap.LookupClassMap(Type classType)
   at MongoDB.Bson.Serialization.BsonClassMapSerializationProvider.GetSerializer(Type type, IBsonSerializerRegistry serializerRegistry)
   at MongoDB.Bson.Serialization.BsonSerializerRegistry.CreateSerializer(Type type)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at MongoDB.Bson.Serialization.BsonSerializerRegistry.GetSerializer(Type type)
   at MongoDB.Bson.Serialization.BsonSerializerRegistry.GetSerializer[T]()
   at MongoDB.Driver.MongoCollectionImpl`1..ctor(IMongoDatabase database, CollectionNamespace collectionNamespace, MongoCollectionSettings settings, ICluster cluster, IOperationExecutor operationExecutor)
   at MongoDB.Driver.MongoDatabaseImpl.GetCollection[TDocument](String name, MongoCollectionSettings settings)
   at EventFlow.MongoDB.SnapshotStores.MongoDbSnapshotPersistence.GetSnapshotAsync(Type aggregateType, IIdentity identity, CancellationToken cancellationToken)
   at EventFlow.Snapshots.SnapshotStore.LoadSnapshotAsync[TAggregate,TIdentity,TSnapshot](TIdentity identity, CancellationToken cancellationToken)
   at EventFlow.Snapshots.SnapshotAggregateRoot`3.LoadAsync(IEventStore eventStore, ISnapshotStore snapshotStore, CancellationToken cancellationToken)
   at EventFlow.Aggregates.AggregateStore.LoadAsync[TAggregate,TIdentity](TIdentity id, CancellationToken cancellationToken)
   at EventFlow.Aggregates.AggregateStore.<>c__DisplayClass11_0`3.<<UpdateAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at EventFlow.Core.TransientFaultHandler`1.TryAsync[T](Func`2 action, Label label, CancellationToken cancellationToken)
   at EventFlow.Aggregates.AggregateStore.UpdateAsync[TAggregate,TIdentity,TExecutionResult](TIdentity id, ISourceId sourceId, Func`3 updateAggregate, CancellationToken cancellationToken)
   at EventFlow.CommandBus.ExecuteCommandAsync[TAggregate,TIdentity,TResult](ICommand`3 command, CancellationToken cancellationToken)
   at EventFlow.CommandBus.PublishAsync[TAggregate,TIdentity,TResult](ICommand`3 command, CancellationToken cancellationToken)

I reverted your commit, you can create a new pull request.

Originally posted by @OKTAYKIR in #4 (comment)

@OKTAYKIR OKTAYKIR added the enhancement New feature or request label May 15, 2020
@suadev
Copy link
Contributor

suadev commented May 15, 2020

I would want to run tests before creating pull request but haven't seen them :)

By the way, Did you try to upgrade your mongo dependencies due to dotnet core 3.1? It might be works.

@OKTAYKIR
Copy link
Owner Author

You are right, there are no tests yet :(, but i created an issue #6 for this.

@OKTAYKIR
Copy link
Owner Author

@suadev You can now run integration tests.

By the way, you can see the test results in the CI pipeline

@OKTAYKIR OKTAYKIR added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants