I've attached a sample Service Definition (SD) file, which exemplifies the problem. This thing bombs when I try to start a service on ArcGIS Server. If I unzip the SD, unzip the .msd, and then look at any of the .xml files, I see that the connection strings to the datasets look like this:
Why is this? These are supposed to be relative paths!! Of course ArcGIS Server is not going to have access to this path and subsequently fail. This seems like a bug in the Service Definition creation process.
FYI - to create the Service Definition, I go to: File > Share As > Service > Save a service definition file > click to 'Include data...'.
If I click 'Include data...' why would it ever save absolute paths? Is there a bug where sometimes it saves the absolute path even though I included the data?
Also FYI -- I've seen this behavior in every version of ArcMap since Service Definition files came into existence.
What's the error when the SD is uploaded? Is the service spinning up looking for the data in the M:\ path? When the SD file is uploaded to the Server, the publishing process extracts the SD file and "swizzles" the data sources, meaning it should update the paths within the .msd to point to the location where the included data will be extracted to. Are you not seeing that? When you selec No Connection and include the data, the service should extract the data into the arcgisinput folder:
The same thing should happen if you use a connection to the Server and then it validates if the file path is registered as a data store. The analyzer will also give you an indication that the data will be copied.
I uploaded another SD. This one has relative paths. When does ESRI put absolute vs. relative paths in the MSD? It seems like 99.9% of the time, it has relative paths. Is there any rhyme or reason to it?
The original one was created by an end-user. The one with relative paths was created by me using the exact steps that I outlined above. I am having a hard time recreating my end-user's SD with absolute paths and I'm trying to figure out how it happened. I can see it happening if they forgot to check the box to 'Include data...', but their data is in there... they must have checked the box.
If I upload the 'bad' (Bathymetry.sd) Service Definition to an ArcGIS Server, yes, it does try (and fail) to spin up a service with M:\IthacaBathymetry\..... as the file path. Here's the error message:
The Layer:'1938Contours (in feet)' in Map:'Layers in NAD_1983_StatePlane_New_York_Central_FIPS_3102_Feet' is invalid. The base table definition string "1938Contours" is invalid. The database was not found.
Jonathan talks about ESRI '"swizzling" the data paths, but I think all of that occurs while ArcMap is creating the SD. I don't think ArcGIS Server does any of the 'swizzling'. I'm pretty convinced there's a bug in ArcMap causing local paths to appear in SDs even though the user checked the box to include the data.
ESRI, please help.
Hey Donald, have you or your end user been able to reproduce that behavior consistently? Are they creating the SD files through the UI or using a script? If they do see this consistently, can they provide the steps they go through?