M.App Enterprise Discussions

Discuss topics with other M.App Enterprise Product pioneers and experts to get the most out of it.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Frequent Contributor
Posts: 119
Registered: ‎07-25-2018
Accepted Solution

DataSet missing for a tenant

Hi  Community,

 

 

In M.App Enterprise Studio I cannot add any datasets to the Legend for a particular Tenant. It is working as expected for other tenants

The dataset is missing Although the datasets do exist within the content vector Data screen.

 

The following error is occurring in the Log.The given key was not present in the dictionary.‎

 

 

‎System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.[Details]MS_LoggedBy: System.Collections.Generic.List`1[System.Object]at System.ThrowHelper.ThrowKeyNotFoundException()at System.Collections.Generic.Dictionary`2.get_Item(TKey key)at MApp.Endpoints.DatasetContentController.CheckVectorBounds(Dataset dataset, Dictionary`2 vectorDatasetMapping)at MApp.Endpoints.DatasetContentController.MapDatasets(IEnumerable`1 entityDatasets, Dictionary`2 vectorDatasetMapping)at MApp.Endpoints.DatasetContentController.<GetDatasetsByType>d__1.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Threading.Tasks.TaskHelpersExtensions.<CastToObject>d__1`1.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Controllers.AuthenticationFilterResult.<ExecuteAsync>d__5.MoveNext()--- End of stack trace from previous location where exception was thrown ---at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()

 

 

Regards,

Sreedevi

Frequent Contributor
Posts: 119
Registered: ‎07-25-2018

Re: DataSet missing for a tenant

Hi Community,

 

Any suggestions on what could be missing here?

 

 

Regards,

Sreedevi

Frequent Contributor
Posts: 119
Registered: ‎07-25-2018

Re: DataSet missing for a tenant

Hi Community,

 

One more user is facing the same issue. Dataset displays 'No Items'  when i go and add a new legend.

 

select * from MAPP_THEME mt inner join MAPP_THEME_LAYER mtl on mt.ID=mtl.THEME_ID inner join MAPP_LAYER mla on mla.ID= mtl.LAYER_ID inner join MAPP_DATASET mada on mada.ID= mla.DATASET_ID

 

 

This query returns the layer details in the database.

 

Regards,

Sreedevi

Technical Evangelist
Posts: 1,147
Registered: ‎09-11-2015

Re: DataSet missing for a tenant

Hi Sreedevi,

 

Does it happen for any dataset and any legend combination, or just for a certain items?

Could it be that either dataset or legend got manipulated somehow in the database?

 

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Frequent Contributor
Posts: 119
Registered: ‎07-25-2018

Re: DataSet missing for a tenant

 

 

Hi Jan,

 

Yes. But it is happening for only one of  tenants. No issues on other tenants. One of our customers also reported the same issue recently. They too facing the issue on only a particular tenant in production. Data is present in the database though. What could be the possible reason for the corruption? Is there any way to fix it?

 

 

Regards,

Sreedevi

 

Technical Evangelist
Posts: 1,147
Registered: ‎09-11-2015

Re: DataSet missing for a tenant

Yes, it happens for any dataset and legend combination,

or, yes, it happens just for a certain legend / dataset? 🙂

 

I can't tell if there's a data corruption and what caused it, but you might be able to know more if you inspect the SQL statements sent to the database when this problem occurs. It may tell what data IDs are expected and if they actually exist.

 

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Frequent Contributor
Posts: 119
Registered: ‎07-25-2018

Re: DataSet missing for a tenant

Hi Jan,

 

It is happening for all datasets and legend combination with in the Tenant.

 

Thanks,

Sreedevi

 

 

Frequent Contributor
Posts: 119
Registered: ‎07-25-2018

Re: DataSet missing for a tenant

Hello,

 

The errror is logged in Security when i click on the New button in the Legend or if i click on the edit icon of an existing Legend.

The issue is present in both Rich client and browser App.

 

Vector Sets are displaying under the vecotor sets tab in legends.

 

 

Following are the two select queries that run before the error is logged in MAPP_LOGMESSAGE

 

 

SELECT vs.*,
vsv.dataset_id,
d.name AS dataset_name, d.datasettype AS dataset_type, d.srid AS dataset_srid,
v.iscached AS vector_iscached, v.minx AS vector_minx, v.maxx AS vector_maxx, v.miny AS vector_miny, v.maxy AS vector_maxy
FROM mapp_vectorset vs
LEFT JOIN mapp_vectorset_vector vsv ON vsv.vectorset_id=vs.id
LEFT JOIN mapp_dataset d ON d.id=vsv.dataset_id
LEFT JOIN mapp_vector v ON v.dataset_id=d.id
ORDER BY vs.name, vsv.levelindex

 

 

 

SELECT Id, Entity, Filter, Tooltip, KeyField, GeometryField, IsSnapable, IsCached, MinX, MinY, MaxX, MaxY, FitFactor, BufferSizeFactor, MapInterpretation, Dimension, GeometryType, GeometrySrid, CONNECTION_ID, DATASET_ID FROM MAPP_VECTOR

 

 

These two queries are running with out any error and displaying data when ran directly on Sql Server Database.

 

Regards,

Sreedevi

 

Technical Evangelist
Posts: 1,147
Registered: ‎09-11-2015

Re: DataSet missing for a tenant

This may be a blind shot, but I think it happens when the server tries to map Dataset to a vector data.

 

The following statements should return the same number of rows:

SELECT * FROM mapp_dataset WHERE datasettype = 2 ORDER BY name
go
SELECT Id, Entity, Filter, Tooltip, KeyField, GeometryField, IsSnapable, IsCached, MinX, MinY, MaxX, MaxY, FitFactor, BufferSizeFactor, MapInterpretation, Dimension, GeometryType, GeometrySrid, CONNECTION_ID, DATASET_ID FROM MAPP_VECTOR
go

 

Do you get the same number of rows?

 

If I'm not wrong, the following statement could reveal if there's a dataset without a vector data assigned:

SELECT md.ID, md.NAME, mv.DATASET_ID, mv.ENTITY FROM mapp_dataset md
LEFT JOIN MAPP_VECTOR mv on md.ID = mv.DATASET_ID
WHERE datasettype = 2

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Frequent Contributor
Posts: 119
Registered: ‎07-25-2018

Re: DataSet missing for a tenant

 

Thank you Jan.

 

The row numbers are different .

 

This query brings back 21 rows 

SELECT * FROM mapp_dataset WHERE datasettype = 2 ORDER BY name 

 

This query brings back 20 rows

SELECT Id, Entity, Filter, Tooltip, KeyField, GeometryField, IsSnapable, IsCached, MinX, MinY, MaxX, MaxY, FitFactor, BufferSizeFactor, MapInterpretation, Dimension, GeometryType, GeometrySrid, CONNECTION_ID, DATASET_ID FROM MAPP_VECTOR
go

 

 

The below query returns 21 rows with one record having DATASET_ID and ENTITY column with null values.

I have attached a screenshot of this query result

 

SELECT md.ID, md.NAME, mv.DATASET_ID, mv.ENTITY FROM mapp_dataset md
LEFT JOIN MAPP_VECTOR mv on md.ID = mv.DATASET_ID
WHERE datasettype = 2

 

Regards,

Sreedevi