"Invalid XML. :" on OpenAsync

7276
13
10-24-2014 12:16 PM
JohnSelkirk
New Contributor III

Hi,

I created a SQLite geodatabase using the GenerateGeodatabaseAsync method and it seemed to work as expected.

A GDB was created and downloaded properly but when I try to open it I get: "Invalid XML. :"

The StackTrace is:

"   at RuntimeCoreNet.Interop.HandleException(Boolean retVal)\r\n   at RuntimeCoreNet.CoreFeatureCache..ctor(String databasePath)\r\n   at Esri.ArcGISRuntime.Data.Geodatabase..ctor(String path)\r\n   at Esri.ArcGISRuntime.Data.Geodatabase.OpenAsync(String path)\r\n   at TCT.Mims.Sync.Server.Runtime.IncrementalSync.<UpdateDatabase>d__27.MoveNext() in :::"

Has anyone seen that message before? The only reference I see Googling with Bing is the Esri page on Editing and Syncing Feature table editing and sync error codes—ArcGIS Runtime SDK for iOS | ArcGIS for Developers

Without anything after the "Invalid XML. :" to indicate what XML (or table even if the XML is null) it's hard to track it down.

Thanks,

John.

0 Kudos
13 Replies
dotMorten_esri
Esri Notable Contributor

Sounds like there's an issue with the internal database schema. What version of the server did you use to generate the gdb with? Is it possible to share the gdb so I can poke inside and see what's going on?

0 Kudos
JohnSelkirk
New Contributor III

Hi Morten,

Server version is 10.2.2.

Esri.ArcGISRuntime.dll is 10.2.4.748

The DB zipped is 11MB so if you have somewhere I can post it then it would be great if you could take a look,

John.

0 Kudos
JohnSelkirk
New Contributor III

The problem in this case was a field (Enabled) in that was required due to it being involved in a SubType but was not a visible field. This meant it was not part of the generated Geodatabase.

Thanks for figuring it out Morten.

JohnSelkirk
New Contributor III

I don't know if this is the correct forum to post this and if it's not then just point me in the right direction...

There seems to be multiple instances where you get an Invalid XML message. The ones that I have found so far are:

  • Sub-type requires a field that is not in the Geodatabase as it was set to not visible in the map layer
  • Feature Class has a relationship to a table but the table is not in the Geodatabase. The service can be published (Analyze gives a Medium? warning) but you cannot open the generated GDB.

There are more occasions when this happens though.

I have:

  • Removed the Geometric Networks and relationships from the ArcSDE database
  • Made sure that all of the FCs has a GlobalID set
  • Created a brand new MXD and added ALL layers and tables (so all fields are visible and nothing, that I know of, is missing)
  • Published the feature service and generated a SQLite geodatabase from it
  • Still get a Invalid XML

Is there additional Runtime logging that can be turned on to see what is going on? It would be nice to have a more detailed explanation of what is going on.

If have 2 SQLite GDBs if anyone wants to look at them. One is with a simplified ArcSDE schema (no geom network and no rels) and the other is the actual schema we are trying to use (ArcSDE contains multiple geometric networks and relationships). Both fail to open with thee Invalid XML error.

MattDenton
New Contributor II

Thanks for following-up here.  I'm experiencing similar issues, and without more-verbose messages, it's tedious to track down what is wrong.

0 Kudos
847396730
Occasional Contributor III

I am having this issue as well.  After waiting with bated breath for the related table support in iOS Collector 10.3, it is deployed, but I'm getting the failed to download/invalid xml error, so we can't use it.

I have checked the suggestions presented above (thank you!) and still am left with no resolution.  ArcGIS Server 10.3, iOS Collector 10.3, iOS 8.2

0 Kudos
847396730
Occasional Contributor III

After trying a few different things, it appears that my solution was to make sure ALL fields are toggled on in the service, even if those fields are not subtypes and do not participate in the relationships.

JasonBalmut
Occasional Contributor III

I'm getting the same "Invalid XML" error message and I've tried all but one thing to get it resolved: Setting the Global ID as the Primary Key on all of the relationship classes as suggested in the Prepare Data For Offline Use documentation.  I hesitate to do it because this is our client's database and it works for them on their collection devices.

I'd really like to see this issue resolved going forward or make it well-known that if you ever intend on using the Collector app to capture data offline, that Global IDs are the only way to establish relationship classes.

I added a proposal on the Ideas page to prompt the addition of Global IDs before using Create Attachments (Create Attachments - Prompt for Global IDs).  That might alleviate some of the issues.

ThadTilton
Esri Contributor

To add to the list of potential offenders:

I also ran into this exception earlier this week. In my case, the problem was a coded value domain in the database that did not have any values defined. The empty domain didn't cause issues in ArcMap, but the runtime was unable to load any of the tables. Once values were added to the domain, ArcGIS Runtime was happy.