Skip to main content
12-Amethyst
July 31, 2020
Solved

Failed to update data table (some times), getting - Data store unknown error

  • July 31, 2020
  • 1 reply
  • 1765 views

Hi 

We are trying to update data table during run time and we are encountering the following exception some times. We observed like after 3 or 4 continuous operations we are getting this error.

 

java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.thingworx.common.exceptions.DataAccessException: [1,018] Data store unknown error: [Error occurred while accessing the data provider.]

 

The following is the data table structure snippet, we have 2 string columns as primary key and the max number of records are less than 50 in this data table. 

 

nmohammed_0-1596181065981.png

The following is the service we are using to update the data table.

var params = {
tags : tags,
source : me.name,
values : values,
location : location
};

// AddOrUpdateDataTableEntry(tags:TAGS, source:STRING("me.name"), values:INFOTABLE(IIOT_EN_DT_ResponsiblePerson), location:LOCATION):STRING
var id = Things["IIOT_EN_DT_ResponsiblePerson"].AddOrUpdateDataTableEntry(params);

 

It is a show stopper for us now. Highly appreciate if you have any recommendations .

Best answer by nmohammed

During our investigation we found that update data table service being called twice at the same time, one from mashup and one from another service. The script error log was throwing duplicate key for both the service attempts instead of inserting a record for one service and throwing duplicate for another service attempt. 

We removed service binding from the mashup. Issue got resolved. 

We can close this thread.

1 reply

Community Manager
July 31, 2020

Hi @nmohammed.

 

I would recommend checking the knowledge base for potential causes.  This might be a good starting point.

 

If you're unable to make any progress toward a solution, I recommend that a case be opened.  I will be happy to open one on your behalf.

 

Regards.

 

--Sharon

nmohammed12-AmethystAuthorAnswer
12-Amethyst
August 7, 2020

During our investigation we found that update data table service being called twice at the same time, one from mashup and one from another service. The script error log was throwing duplicate key for both the service attempts instead of inserting a record for one service and throwing duplicate for another service attempt. 

We removed service binding from the mashup. Issue got resolved. 

We can close this thread.