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

Cap Version Compatible Exception is TypeLoadException #764

Closed
jianxuanbing opened this issue Jan 12, 2021 · 6 comments
Closed

Cap Version Compatible Exception is TypeLoadException #764

jianxuanbing opened this issue Jan 12, 2021 · 6 comments

Comments

@jianxuanbing
Copy link

core version: cap:3.1.2
queue version: RabbitMQ:3.1.2
dashboard version: 3.1.2
storage version:mysql:3.0.4(because the mysql version restriction problem,Pomelo.EntityFrameworkCore.MySql MySqlConnector is >=0.69.9 && <1.0.0)

mysql storage has conflict.

publish event has exception:

System.TypeLoadException: Could not load type 'DotNetCore.CAP.Serialization.StringSerializer' from assembly 'DotNetCore.CAP, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null'.
   at DotNetCore.CAP.MySql.MySqlDataStorage.StoreMessage(String name, Message content, Object dbTransaction)
   at DotNetCore.CAP.Internal.CapPublisher.Publish[T](String name, T value, IDictionary`2 headers)
   at DotNetCore.CAP.Internal.CapPublisher.Publish[T](String name, T value, String callbackName)
   at DotNetCore.CAP.Internal.CapPublisher.<>c__DisplayClass11_0`1.<PublishAsync>b__0()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location where exception was thrown ---
   at Bing.Events.Cap.MessageEventBus.InternalPublishAsync(String name, Object data, String callback) in H:\BingFramework\Bing.NetCore\framework\src\Bing.Events\Cap\MessageEventBus.cs:line 72
   at Bing.Events.Cap.MessageEventBus.<>c__DisplayClass10_0.<<PublishAsync>b__0>d.MoveNext() in H:\BingFramework\Bing.NetCore\framework\src\Bing.Events\Cap\MessageEventBus.cs:line 60
--- End of stack trace from previous location where exception was thrown ---
   at Bing.Data.Transaction.TransactionActionManager.CommitAsync(IDbTransaction transaction) in H:\BingFramework\Bing.NetCore\framework\src\Bing.Data\Bing\Data\Transaction\TransactionActionManager.cs:line 46
   at Bing.Admin.Data.UnitOfWorks.MySql.AdminUnitOfWork.TransactionCommit(ITransactionActionManager transactionActionManager, CancellationToken cancellationToken) in H:\BingFramework\Bing.NetCore\modules\admin\src\Bing.Admin.Data.EFCore\UnitOfWorks\MySql\AdminUnitOfWork.cs:line 54
   at Bing.Admin.Data.UnitOfWorks.MySql.AdminUnitOfWork.SaveChangesAsync(CancellationToken cancellationToken) in H:\BingFramework\Bing.NetCore\modules\admin\src\Bing.Admin.Data.EFCore\UnitOfWorks\MySql\AdminUnitOfWork.cs:line 34
   at Bing.Datas.EntityFramework.Core.UnitOfWorkBase.CommitAsync() in H:\BingFramework\Bing.NetCore\framework\src\Bing.Datas.EntityFramework\Core\UnitOfWorkBase.cs:line 346
   at Bing.Admin.Service.Implements.SecurityService.SignInAsync(AdminLoginRequest request) in H:\BingFramework\Bing.NetCore\modules\admin\src\Bing.Admin.Service\Implements\SecurityService.cs:line 102
   at Bing.Admin.Apis.OAuthController.SignInAsync(AdminLoginRequest request) in H:\BingFramework\Bing.NetCore\modules\admin\src\Bing.Admin\Apis\OAuthController.cs:line 39
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Bing.AspNetCore.ExceptionHandling.BingExceptionHandlingMiddleware.InvokeAsync(HttpContext context) in H:\BingFramework\Bing.NetCore\framework\src\Bing.AspNetCore\Bing\AspNetCore\ExceptionHandling\BingExceptionHandlingMiddleware.cs:line 32
   at DotNetCore.CAP.DashboardMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()
@xiangxiren
Copy link
Contributor

Now StringSerializer has been replaced by ISerializer. All component versions are recommended to be consistent. As for MySqlConnector, see #690

@jianxuanbing
Copy link
Author

现在StringSerializer已被替换ISerializer。建议所有组件版本保持一致。至于MySqlConnector,看到#690

I know.But I use 3.1.1 version is no problem. And the storage is mysql:3.0.4.
I want to upgrade cap:3.1.2.
However, reality is cruel. mysql and cap has conflict.

@jianxuanbing
Copy link
Author

I want to rewrite MySqlDataStorage. but the Version Property is internal.

@xiangxiren
Copy link
Contributor

现在StringSerializer已被替换ISerializer。建议所有组件版本保持一致。至于MySqlConnector,看到#690

I know.But I use 3.1.1 version is no problem. And the storage is mysql:3.0.4.
I want to upgrade cap:3.1.2.
However, reality is cruel. mysql and cap has conflict.

There is no conflict between MYSQL and CAP. DotNetCore.CAP.MySql conflicts with the version of MySqlConnector referenced by Pomelo.EntityFrameworkCore.MySql.

@jianxuanbing
Copy link
Author

现在StringSerializer已被替换ISerializer。建议所有组件版本保持一致。至于MySqlConnector,看到#690

I know.But I use 3.1.1 version is no problem. And the storage is mysql:3.0.4.
I want to upgrade cap:3.1.2.
However, reality is cruel. mysql and cap has conflict.

There is no conflict between MYSQL and CAP. DotNetCore.CAP.MySql conflicts with the version of MySqlConnector referenced by Pomelo.EntityFrameworkCore.MySql.

Yes, I write provider name is not complete.

@yang-xiaodong
Copy link
Member

MySqlConnector 1.0+ will be supported in version 5.0 of Pomelo.EntityFrameworkCore.MySql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants