Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.
Provide us with the following info:
🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration
button.
- Exception message and full stack trace:
- 2025-08-17 23:53:56.436 +08:00 [DBG] PermissionStore.GetCacheItemAsync: pn:C,pk:Angular,n:AbpIdentity.OrganizationUnits 2025-08-17 23:53:56.436 +08:00 [DBG] Found in the cache: pn:C,pk:Angular,n:AbpIdentity.OrganizationUnits 2025-08-17 23:53:56.454 +08:00 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "对不起,在处理您的请求期间产生了一个服务器内部错误!!", "details": null, "data": null, "validationErrors": null }
2025-08-17 23:53:56.454 +08:00 [ERR] Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.EntityFrameworkCore.Query.ExpressionExtensions.InferTypeMapping(SqlExpression[] expressions)
at MySql.EntityFrameworkCore.Query.Internal.MySQLSqlExpressionFactory.ApplyTypeMappingOnCollate(MySQLCollateExpression collateExpression)
at MySql.EntityFrameworkCore.Query.Internal.MySQLSqlExpressionFactory.ApplyNewTypeMapping(SqlExpression sqlExpression, RelationalTypeMapping typeMapping)
at MySql.EntityFrameworkCore.Query.Internal.MySQLSqlExpressionFactory.Collate(SqlExpression valueExpression, String charset, String collation)
at MySql.EntityFrameworkCore.Query.Expressions.Internal.MySQLStringComparisonMethodTranslator.Utf8Bin(SqlExpression value)
at MySql.EntityFrameworkCore.Query.Expressions.Internal.MySQLStringComparisonMethodTranslator.<>c__DisplayClass11_0.b__0()
at MySql.EntityFrameworkCore.Query.Expressions.Internal.MySQLStringComparisonMethodTranslator.CreateExpressionForCaseSensitivity(StringComparison cmp, Func1 ifCaseSensitive, Func
1 ifCaseInsensitive)
at MySql.EntityFrameworkCore.Query.Expressions.Internal.MySQLStringComparisonMethodTranslator.MakeStartsWithExpression(SqlExpression target, SqlExpression prefix, SqlExpression stringComparison)
at MySql.EntityFrameworkCore.Query.Internal.MySQLStringMethodTranslator.Translate(SqlExpression instance, MethodInfo method, IReadOnlyList1 arguments, IDiagnosticsLogger
1 logger)
at Microsoft.EntityFrameworkCore.Query.RelationalMethodCallTranslatorProvider.<>c__DisplayClass7_0.b__0(IMethodCallTranslator t)
at System.Linq.Enumerable.IteratorSelectIterator2.MoveNext() at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable
1 source, Func2 predicate, Boolean& found) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable
1 source, Func2 predicate) at Microsoft.EntityFrameworkCore.Query.RelationalMethodCallTranslatorProvider.Translate(IModel model, SqlExpression instance, MethodInfo method, IReadOnlyList
1 arguments, IDiagnosticsLogger1 logger) at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.TranslateInternal(Expression expression, Boolean applyDefaultTypeMapping) at Microsoft.EntityFrameworkCore.Query.RelationalSqlTranslatingExpressionVisitor.Translate(Expression expression, Boolean applyDefaultTypeMapping) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateExpression(Expression expression, Boolean applyDefaultTypeMapping) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateLambdaExpression(ShapedQueryExpression shapedQueryExpression, LambdaExpression lambdaExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.TranslateWhere(ShapedQueryExpression source, LambdaExpression predicate) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.RelationalQueryableMethodTranslatingExpressionVisitor.VisitMethodCall(MethodCallExpression methodCallExpression) at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.Translate(Expression expression) at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutorExpression[TResult](Expression query) at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query) at Microsoft.EntityFrameworkCore.Storage.Database.CompileQuery[TResult](Expression query, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.CompileQueryCore[TResult](IDatabase database, Expression query, IModel model, Boolean async) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass11_0
1.b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func1 compiler) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteCore[TResult](Expression query, Boolean async, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken) at Volo.Abp.EntityFrameworkCore.AbpEntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable
1.GetAsyncEnumerator(CancellationToken cancellationToken)
at System.Runtime.CompilerServices.ConfiguredCancelableAsyncEnumerable1.GetAsyncEnumerator() at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable
1 source, CancellationToken cancellationToken)
at Volo.Abp.Identity.EntityFrameworkCore.EfCoreOrganizationUnitRepository.CreateGetMembersFilteredQueryAsync(OrganizationUnit organizationUnit, String filter, Boolean includeChildren)
at Volo.Abp.Identity.EntityFrameworkCore.EfCoreOrganizationUnitRepository.GetMembersCountAsync(OrganizationUnit organizationUnit, String filter, Boolean includeChildren, CancellationToken cancellationToken)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.Identity.OrganizationUnitAppService.b9QEddYmM4(OrganizationUnit , Dictionary
2 )
at Volo.Abp.Identity.OrganizationUnitAppService.UWpEBQ7wWD(OrganizationUnit )
at Volo.Abp.Identity.OrganizationUnitAppService.CreateAsync(OrganizationUnitCreateDto input)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue
1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func
3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter
1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at lambda_method3767(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, 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.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.g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
2025-08-17 23:53:56.454 +08:00 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'.
2025-08-17 23:53:56.454 +08:00 [INF] Executed action Volo.Abp.Identity.OrganizationUnitController.CreateAsync (Volo.Abp.Identity.Pro.HttpApi) in 23.6803ms
19 Answer(s)
-
0
hi
Can you share your test project?
liming.ma@volosoft.com
Thanks.
-
0
[maliming] said: hi
Can you share your test project?
liming.ma@volosoft.com
Thanks.
Excuse me. You can down test project from the link:https://limewire.com/d/C51ZC#qWDI6DGCnZ.
-
0
This is a known issue when using ABP v9.3.1 with MySQL after upgrading from v9.2.3, specifically when creating an Organization Unit. The stack trace shows a
NullReferenceException
in the MySQL EF Core provider, related to string comparison/collation handling in queries.Cause
- The ABP Identity module (OrganizationUnit) uses string comparison methods (like
StartsWith
,Contains
, etc.) in its queries. - In v9.3.1, changes in ABP or the MySQL EF Core provider (Pomelo.EntityFrameworkCore.MySql or MySql.EntityFrameworkCore) can cause a
NullReferenceException
if the database or provider is not configured with the correct collation or charset, or if the provider has a bug in its string comparison translation.
Solution / Workarounds
Update MySQL EF Core Provider
- Ensure you are using the latest compatible version of your MySQL EF Core provider (e.g., Pomelo.EntityFrameworkCore.MySql or MySql.EntityFrameworkCore).
- Check the ABP documentation for the recommended provider and version for v9.3.1.
Check Database Collation
- Make sure your MySQL database and tables use a supported collation (e.g.,
utf8mb4_general_ci
orutf8mb4_unicode_ci
). - Avoid mixing collations or charsets.
- Make sure your MySQL database and tables use a supported collation (e.g.,
Review Connection String
- Add or update the
CharSet
andCollation
in your connection string, for example:
- Add or update the
Server=localhost;Database=YourDb;User=xxx;Password=xxx;CharSet=utf8mb4;Collation=utf8mb4_unicode_ci;
Check for ABP/EF Core Breaking Changes
- Review the ABP and EF Core release notes for any breaking changes related to string comparison or MySQL support.
Downgrade as a Temporary Fix
- If urgent, you can temporarily downgrade to v9.2.3 until a fix or patch is available.
Report to ABP Support
- If the above steps do not resolve the issue, report it to ABP support with your stack trace and provider version.
Sources:
This issue is related to the MySQL provider's handling of string comparison in EF Core queries. Upgrading the provider or adjusting your database collation usually resolves it.
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
- The ABP Identity module (OrganizationUnit) uses string comparison methods (like
-
0
hi
9.3 will use
MySql.EntityFrameworkCore
by default.You can switch it to Pomelo MySQL
See https://abp.io/docs/latest/framework/data/entity-framework-core/mysql#use-pomelo-provider
-
0
[maliming] said: hi
9.3 will use
MySql.EntityFrameworkCore
by default.You can switch it to Pomelo MySQL
See https://abp.io/docs/latest/framework/data/entity-framework-core/mysql#use-pomelo-provider
Thanks a lot! I will try to replace soon.
-
0
ok, I will try to find the reason. It seems the
MySql.EntityFrameworkCore
has some problems. -
0
This is a MySQL problem.
https://bugs.mysql.com/bug.php?id=118460
-
0
[48949912] said:
[maliming] said: hi
9.3 will use
MySql.EntityFrameworkCore
by default.You can switch it to Pomelo MySQL
See https://abp.io/docs/latest/framework/data/entity-framework-core/mysql#use-pomelo-provider
Thanks a lot! I will try to replace soon.
Thanks a lot! After switch it to Pomelo MySQL,the problem resolved.
-
0
Great
-
0
[maliming] said: Great
I found another bug: First add a new entity and save/generate by ABP Suite V9.3.1
Then it gives error like this
It auto add using namespce "using QRSPC.MsaService.Services.Dtos.Shared",but the correct is "using QRSPC.MsaService.Shared",you can see in the green square. The ABP Suie V9.2.3 is no such issue.
-
0
I will forward to our suite team.
Thanks.
-
0
[maliming] said: I will forward to our suite team.
Thanks.
Excuse me! How to Resolve this problem?
-
0
[48949912] said:
[maliming] said: I will forward to our suite team.
Thanks.
Excuse me! How to Resolve this problem?
Hi, the problem you stated is a known problem and we will fix it soon. In the meantime, the only possible solution is to fix it in the generated code. So, manually delete the related line in your automapper class for now.
-
0
[EngincanV] said:
[48949912] said:
[maliming] said:
I will forward to our suite team.Thanks.
Excuse me!
How to Resolve this problem?Hi, the problem you stated is a known problem and we will fix it soon. In the meantime, the only possible solution is to fix it in the generated code. So, manually delete the related line in your automapper class for now.
Excuse me! How long will it take to fix? The project is urgent. Manual modification is possible, but it's a bit tedious and will require extra time.
-
0
[48949912] said:
[EngincanV] said:
[48949912] said:
[maliming] said:
I will forward to our suite team.Thanks.
Excuse me!
How to Resolve this problem?Hi, the problem you stated is a known problem and we will fix it soon. In the meantime, the only possible solution is to fix it in the generated code. So, manually delete the related line in your automapper class for now.
Excuse me! How long will it take to fix? The project is urgent. Manual modification is possible, but it's a bit tedious and will require extra time.
We have an open issue for this problem and will try to fix it asap, but unfortunately, we can't give an exact time for now.
-
0
[EngincanV] said:
[48949912] said:
[EngincanV] said:
[48949912] said:
[maliming] said:
I will forward to our suite team.Thanks.
Excuse me!
How to Resolve this problem?Hi, the problem you stated is a known problem and we will fix it soon. In the meantime, the only possible solution is to fix it in the generated code. So, manually delete the related line in your automapper class for now.
Excuse me!
How long will it take to fix? The project is urgent. Manual modification is possible, but it's a bit tedious and will require extra time.We have an open issue for this problem and will try to fix it asap, but unfortunately, we can't give an exact time for now.
Could this issue be resolved within this week? It's significantly impacting usability.
-
0
hi
We will release it asap.
Thanks.
-
0
[maliming] said: hi
We will release it asap.
Thanks.
Thanks a lost!
-
0
: )