Closed johanvonboer closed 5 years ago
Trace log:
SELECT x.facet_id, x.aggregate_facet_id, x.aggregate_title, x.aggregate_type, x.category_id_expr, x.category_name_expr, x.display_title, x.facet_code, x.facet_group_id, x.facet_type_id, x.icon_id_expr, x.is_applicable, x.is_default, x.sort_expr, "x.FacetType".facet_type_id, "x.FacetType".facet_type_name, "x.FacetType".reload_as_target, "x.FacetGroup".facet_group_id, "x.FacetGroup".display_title, "x.FacetGroup".facet_group_key, "x.FacetGroup".is_applicable, "x.FacetGroup".is_default
FROM facet.facet AS x
INNER JOIN facet.facet_type AS "x.FacetType" ON x.facet_type_id = "x.FacetType".facet_type_id
INNER JOIN facet.facet_group AS "x.FacetGroup" ON x.facet_group_id = "x.FacetGroup".facet_group_id
ORDER BY x.facet_id
TRACE [11766] Cleaning up reader
TRACE [11766] End user action
TRACE [11766] Start user action
DEBUG [11766] Executing statement(s):
SELECT "x.Tables".facet_table_id, "x.Tables".alias, "x.Tables".facet_id, "x.Tables".udf_call_arguments, "x.Tables".table_or_udf_name, "x.Tables".schema_name, "x.Tables".sequence_id
FROM facet.facet_table AS "x.Tables"
INNER JOIN (
SELECT DISTINCT x0.facet_id
FROM facet.facet AS x0
INNER JOIN facet.facet_type AS "x.FacetType0" ON x0.facet_type_id = "x.FacetType0".facet_type_id
INNER JOIN facet.facet_group AS "x.FacetGroup0" ON x0.facet_group_id = "x.FacetGroup0".facet_group_id
) AS t ON "x.Tables".facet_id = t.facet_id
ORDER BY t.facet_id
TRACE [11766] Cleaning up reader
TRACE [11766] End user action
TRACE [11766] Start user action
DEBUG [11766] Executing statement(s):
SELECT "x.Clauses".facet_source_table_id, "x.Clauses".clause, "x.Clauses".facet_id
FROM facet.facet_clause AS "x.Clauses"
INNER JOIN (
SELECT DISTINCT x1.facet_id
FROM facet.facet AS x1
INNER JOIN facet.facet_type AS "x.FacetType1" ON x1.facet_type_id = "x.FacetType1".facet_type_id
INNER JOIN facet.facet_group AS "x.FacetGroup1" ON x1.facet_group_id = "x.FacetGroup1".facet_group_id
) AS t0 ON "x.Clauses".facet_id = t0.facet_id
ORDER BY t0.facet_id
TRACE [11766] Cleaning up reader
TRACE [11766] End user action
TRACE [11766] Closing connection...
TRACE [11766] Closing connector
TRACE [11766] Cleaning up connector
DEBUG [11766] Connection closed
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[1]
Executing action method SeadQueryAPI.Controllers.FacetsController.Load (sead.query.api) with arguments () - Validation state: Invalid
info: Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker[2]
Executed action SeadQueryAPI.Controllers.FacetsController.Load (sead.query.api) in 49.7488ms
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLQM6GDV9IS5", Request id "0HLQM6GDV9IS5:00000001": An unhandled exception was thrown by the application.
System.NullReferenceException: Object reference not set to an instance of an object.
at SeadQueryAPI.Serializers.FacetConfigReconstituteService.Reconstitute(FacetsConfig2 facetsConfig) in /src/sead.query.api/Serializers/FacetConfigReconstituteService.cs:line 39
at SeadQueryAPI.Controllers.FacetsController.Load(FacetsConfig2 facetsConfig) in /src/sead.query.api/Controllers/FacetsController.cs:line 79
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.SyncObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
at Microsoft.AspNetCore.Builder.RouterMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
info: Microsoft.AspNetCore.Hosting.Internal.WebHost[2]
Request finished in 51.3241ms 500
See correct JSON below. Note that picks must be specified in accordance to this example.
POST http://localhost:53053/api/facets/load
content-type: application/json
mode: cors
accept: application/json
{
"requestId":1,
"requestType":"populate",
"targetCode":"tbl_denormalized_measured_values_32",
"triggerCode":"tbl_denormalized_measured_values_32",
"facetConfigs":[ {
"facetCode":"tbl_denormalized_measured_values_32",
"position":1,
"picks":[
{ "pickType": 2, "pickValue": "50", "text": "50"},
{ "pickType": 3, "pickValue": "100", "text": "100"}
],
"textFilter":""
}
]
}
fetch("https://seadserv.humlab.umu.se:8089/api/facets/load", {"credentials":"omit","headers":{"accept":"application/json, text/javascript, /; q=0.01","content-type":"application/json; charset=UTF-8","sec-fetch-mode":"cors"},"referrer":"http://localhost:8080/viewstate/Jbmdf7aI","referrerPolicy":"no-referrer-when-downgrade","body":"{\"requestId\":1,\"requestType\":\"populate\",\"targetCode\":\"tbl_denormalized_measured_values_32\",\"facetConfigs\":[{\"facetCode\":\"tbl_denormalized_measured_values_32\",\"position\":1,\"picks\":[50, 100],\"textFilter\":\"\"}]}","method":"POST","mode":"cors"});