-
Notifications
You must be signed in to change notification settings - Fork 164
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
Must declare the scalar variable "@initialVersion". #63
Comments
I think I fixed it. However my application still works, so hope it's the correct solution. Already did a pull request. |
I'm having the same issue. |
I don't know if you can see my pull request with the solution. You can fix it on your own repo until it is merged on the development branche. |
Thanks! I was able to fix the problem. I've updated this method to include initialVersion : private static void UpdateEventSourceVersion(Guid eventSourceId, long newVersion, long initialVersion , SqlTransaction transaction)
|
I was trying to execute a command to create a new AR.
From peeking at the log of MsSqlServerEventStore I think it was probably broken by a merge/refactor between pwistrand's fix for deadlocks - which introduces this new variable - and aweiker's refactoring/cleanup:
699b665#Framework/src/Ncqrs/Eventing/Storage/SQL/MsSqlServerEventStore.cs
9fdb026#Framework/src/Ncqrs/Eventing/Storage/SQL/MsSqlServerEventStore.cs
StackTrace:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Ncqrs.Eventing.Storage.SQL.MsSqlServerEventStore.UpdateEventSourceVersion(Guid eventSourceId, Int64 newVersion, SqlTransaction transaction) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Eventing\Storage\SQL\MsSqlServerEventStore.cs:line 425
at Ncqrs.Eventing.Storage.SQL.MsSqlServerEventStore.StoreEventsFromSource(Guid eventSourceId, Int64 eventSourceVersion, IEnumerable
1 events, SqlTransaction transaction) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Eventing\Storage\SQL\MsSqlServerEventStore.cs:line 530 at Ncqrs.Eventing.Storage.SQL.MsSqlServerEventStore.Store(UncommittedEventStream eventStream) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Eventing\Storage\SQL\MsSqlServerEventStore.cs:line 340 at Ncqrs.Domain.UnitOfWork.Accept() in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Domain\UnitOfWork.cs:line 91 at Ncqrs.Commanding.CommandExecution.Mapping.UoWMappedCommandExecutor.UoWMappedCommandExecutorCallbacks.ExecuteActionCreatingNewInstance(Func
2 action) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\CommandExecution\Mapping\UoWMappedCommandExecutor.cs:line 49at Ncqrs.Commanding.CommandExecution.Mapping.Attributes.MapsToAggregateRootConstructorAttributeHandler.<>c__DisplayClass3.b__2() in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\CommandExecution\Mapping\Attributes\MapsToAggregateRootConstructorAttributeHandler.cs:line 22
at Ncqrs.Commanding.CommandExecution.Mapping.Attributes.MapsToAggregateRootConstructorAttributeHandler.Map(MapsToAggregateRootConstructorAttribute attribute, ICommand command, IMappedCommandExecutor executor) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\CommandExecution\Mapping\Attributes\MapsToAggregateRootConstructorAttributeHandler.cs:line 31
at CallSite.Target(Closure , CallSite , Object , Object , ICommand , IMappedCommandExecutor )
at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid4[T0,T1,T2,T3](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Ncqrs.Commanding.CommandExecution.Mapping.Attributes.AttributeBasedCommandMapper.Map(ICommand command, IMappedCommandExecutor executor) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\CommandExecution\Mapping\Attributes\AttributeBasedCommandMapper.cs:line 59
at Ncqrs.Commanding.CommandExecution.Mapping.UoWMappedCommandExecutor.ExecuteInContext(IUnitOfWorkContext context, ICommand command) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\CommandExecution\Mapping\UoWMappedCommandExecutor.cs:line 17
at Ncqrs.Commanding.CommandExecution.CommandExecutorBase
1.Execute(TCommand command) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\CommandExecution\CommandExecutorBase.cs:line 53 at Ncqrs.Commanding.ServiceModel.CommandService.<>c__DisplayClass9
1.b__8(ICommand cmd) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\ServiceModel\CommandService.cs:line 74at Ncqrs.Commanding.ServiceModel.CommandService.Execute(ICommand command) in d:\workspace\git\ncqrs\Framework\src\Ncqrs\Commanding\ServiceModel\CommandService.cs:line 56
at radiochart_driver.Program.Main() in D:\workspace\hg\radiochart\radiochart-driver\Program.cs:line 21
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
The text was updated successfully, but these errors were encountered: