-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi,
I'm using AgileMapper version 1.7.2.0 and facing some problem when running my donet application on a Docker Container running on Ubuntu Server and my sql database running on a Windows Server.
When running booth app and databse on docker the application is running ok and also when I execute the application and database on Windows is running ok too.
My problem is when using application on linux docker and database on windows server.
My database connection string is:
"GIP": "Server=172.25.40.55;Database=GIP;Trusted_Connection=False;MultipleActiveResultSets=true;User ID=;Password=;"
System.TypeInitializationException: The type initializer for 'AgileObjects.AgileMapper.Mapper' threw an exception.
---> System.TypeInitializationException: The type initializer for 'AgileObjects.AgileMapper.Configuration.MappingConfigInfo' threw an exception.
---> System.TypeInitializationException: The type initializer for 'AgileObjects.AgileMapper.Constants' threw an exception.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at AgileObjects.AgileMapper.Constants.<>c__DisplayClass19_0.b__1(Type t)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](TSource[] source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector)
at AgileObjects.AgileMapper.Constants.GetValuesByType(String fieldName)
at AgileObjects.AgileMapper.Constants..cctor()
--- End of inner exception stack trace ---
at AgileObjects.AgileMapper.Configuration.MappingConfigInfo.ForAllSourceTypes()
at AgileObjects.AgileMapper.Configuration.MappingConfigInfo.AllRuleSetsAndSourceTypes(MapperContext mapperContext)
at AgileObjects.AgileMapper.Configuration.MappingConfigInfo..cctor()
--- End of inner exception stack trace ---
at AgileObjects.AgileMapper.Configuration.ConfiguredNamingPattern.Global(Func`2 matchingNameFactory)
at AgileObjects.AgileMapper.Members.NamingSettings..ctor(CacheSet mapperScopedCache)
at AgileObjects.AgileMapper.MapperContext..ctor()
at AgileObjects.AgileMapper.Mapper.CreateNewInternal()
at AgileObjects.AgileMapper.Mapper..cctor()
--- End of inner exception stack trace ---
at AgileObjects.AgileMapper.Mapper.Map[TSource](TSource source)
at GIP.Controllers.MachineTypeController.Put(Int64 id, MachineTypeViewModel machine, MachineTypeValidation validation) in /app-GIP/GIP/Controllers/MachineTypeController.cs:line 106
at lambda_method27(Closure , Object , Object[] )
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
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()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
HEADERS
Connection: keep-alive
Content-Type: application/json
Accept: application/json
Accept-Encoding: gzip, deflate
Accept-Language: pt-BR,pt;q=0.9
Host: 172.25.50.56:55003
Referer: http://172.25.50.56:55003/swagger/index.html
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
DNT: 1
Origin: http://172.25.50.56:55003
Content-Length: 18