ArcGIS Runtime SQLite Geodatabase Sync Failing Due to Empty String

1095
6
04-15-2021 09:49 AM
KeithLarson1
MVP Alum

Hello All,

 

I am experiencing a very strange error that I can't figure out after lots of searching troubleshooting. I have an ArcGIS Runtime app with a .geodatabase file stored on my computer that was created as a replica from a versioned Geodatabase on a local ArcGIS Server/SQL Server machine. I made a quick edit to the .geodatabase file and attempted to sync the changes just as a small test. It fails after a second or two with the generic 400 error saying "Unable to complete operation". However, since I have access to the server, I logged into the server  manager and checked the logs and I see a more detailed error saying "General function failure [Validation of Row with OID = 13223 and and GlobalID: {...} failed. Error: Field: secondary_structure is  not nullable, cannot set null value]...". I checked the schema for the table in the Geodatabase and in the sqlite .geodatabase file and both show the field as not nullable. The value in the .geodatabase at that specific row is an empty string, not NULL, and I verified this by executing a simple SQL statement to select the row with that OID where secondary_structure is not null, and the row shows up.

So I know that the value is definitely not null in either the replica or the database, yet it still fails saying that it is a null value. My only guess is that it is converting the empty string to a null value causing this error, but why would it do that and is there any way around it? Am I not allowed to have empty strings in fields that are not nullable despite the original value being able to be set to an empty string? The server has ArcGIS Server 10.7.1 installed if that is any help.

I also checked the network traffic in fiddler as I started the sync job from my app and I saw it upload a small .geodatabase edits file. I found it in the server's file system and inspected the values and once again confirmed that the edited row from this table had the same OID and GlobalID and the secondary_structure value was also an empty string and not null.

Any help would be appreciated.

 

Thanks,

Keith

0 Kudos
6 Replies
garymacdougallesri
New Contributor II

Hi Keith

One thing to check here is the delta file that is exported from the mobile geodatabase and uploaded to the server when you sync. You can find the detla file on the server by checking the following folder after syncing:

C:\arcgisserver\directories\arcgissystem\arcgisuploads\services\yourservice.FeatureServer

The file is cleaned up over time so you will want to check it right after running sync.

Want to see if the edit in that file has a null or an empty string

thanks
Gary

0 Kudos
KeithLarson1
MVP Alum

Hey Gary,

I checked that folder after running a sync job and I found the updated row from the T3_updates table and the value that the error referenced was an empty string and not null. I'm not sure how it is seeing a null value.

Thanks,

Keith

0 Kudos
garymacdougallesri
New Contributor II

Hi Keith

 

Would you be OK with sharing the delta - If so, I can reach out over private e-mail to arrange getting it.

thanks

Gary

0 Kudos
KeithLarson1
MVP Alum

Yeah, I can send you the delta file. Thanks!

0 Kudos
garymacdougallesri
New Contributor II

Hi Keith

FYI - Also trying to emulate the case on my end

thanks

Gary

0 Kudos
by Anonymous User
Not applicable

Hi Keith,

As Gary mentioned, we tried emulating the case at our end and were able to reproduce the issue. We are looking into it and will be sure to notify you should we have any updates. 

Thank you,

Ujwal

0 Kudos