cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Highlighted
Newbie

Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Hi,

Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Logs and i can see other logs also but they are not relevant to it.

I checked in thingworx Composer as well and can see that the correct the data shape is assigned to it. Please suggest what could be the reason.

Regards,

Ayushi Gupta

7 REPLIES 7

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Hi Ayushi Gupta​,

When do you receive this error?

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Following article has details on same error when a new DataTable is created via Service.

https://support.ptc.com/appserver/cs/view/solution.jsp?n=CS214813&lang=en_US

Try using the RestartThing Service of the DataTable entry if it resolves the issue.

Also, try restarting your Tomcat to rule out Ghost Entity issue.

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Hi, When tried to hit the URL, getting attached error.Error_PTC.JPG

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

I have no idea on which service call, this error is coming. I think some File Transfer is happening. I too need to find out the actual reason for this error.

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Hi Ayushi Gupta​,

Can you please share the more entries of the logs (Both Application and Script logs) when this error occurs.

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Hi Ankit,

I cannot share the logs because they are confidential. But i found that at 05:01:34 a data table is being created and at 05:01:39 some file transfer is happening which updates this table. So can you tell me that data table creation takes some time for enabling data table thing or it is being created and is ready to be used as soon as we create it programatically ?

Re: Getting this error - "Invalid DataShape [] assigned to DataTable XYZ" in Application Log

Hi Ayushi Gupta​,

When a new entity is created (like a Thing) it will be loaded into the JVM memory immediately, but is not committed to disk until a transaction (service) successfully completes.  For this reason ALL code in a service must be in a try/catch block to handle exceptions.  In order to rollback the create call the catch must call a delete for any entity created.

Please refer to following link for details on Creating a Thing in Service Script.

We should also check in try/catch block if the Thing created is available for use to avoid such issues.

I hope it helps.