I have recently been getting an error when I changed some layers in a map service. The layers are shapefiles and are not registered with the server at this time. I am ok with them being copied to the server but it appears they are not actually being copied when being published. The other layers that are registered in this map service are being published just fine. I checked the logs and found this error which doesn't make any sense to me because no errors show up when trying to overwrite the service. The only issue is that the data is not registered and must be copied to the server. These are small shapefiles so this shouldn't be an issue for publishing.
Solved! Go to Solution.
I finally came up with a different solution. It appears the only way for this to work properly is for the shapefiles to be referenced by a UNC path rather than a mapped path. (\\server\shapefile.shp as opposed to M:\shapefile.shp). The issue still present is that the only way to use a UNC path is to add data from path in Pro. In ArcMap, I could just add using the regular feature and add it directly from the UNC path. I'm not sure if this is an issue with Pro 2.4.2 or an issue with Windows 10. Either way, with this workaround, the layers display properly in the service. I considered just adding these to my SDE but they are used so irregularly, I prefer not to do that.
Morning Josh,
I found these that reference the error you are seeing:
Error: The base table definition string "[STRING]" is invalid
Looks like it may be a folder permissions thing with the account that is running the ArcGIS Server Windows service.
https://community.esri.com/thread/58748
Looks like it was a similar issue for this other user as well.
Hope this helps!
Brian
UPDATE: Giving the user arcgis full permissions did not fix the problem. That particular user did not have full permission before.
I believe it. Although, I don't understand how my permissions changed because what I did was replace another layer that was in the same folder and didn't present the same issues.
I finally came up with a different solution. It appears the only way for this to work properly is for the shapefiles to be referenced by a UNC path rather than a mapped path. (\\server\shapefile.shp as opposed to M:\shapefile.shp). The issue still present is that the only way to use a UNC path is to add data from path in Pro. In ArcMap, I could just add using the regular feature and add it directly from the UNC path. I'm not sure if this is an issue with Pro 2.4.2 or an issue with Windows 10. Either way, with this workaround, the layers display properly in the service. I considered just adding these to my SDE but they are used so irregularly, I prefer not to do that.
Glad to hear that you figured out the issue, Josh. Yes, it would make sense that not using the UNC path would cause that issue as your servers typically aren't going to have mapped drive letters.
I'm not certain that I understand your other issue that you are seeing with Pro? I am able to add files from a UNC path rather than a mapped drive - Granted I am on 2.3.3, not 2.4.x. Can you explain the steps you are taking in Pro where you are running into the problem using the UNC path? I have a VM that I will install 2.4 on and see if I am experiencing the same issue.
When I click on Add Data, I am not given an option to add from any network drive only mapped drives (which are of course network drives anyway). I added a screenshot below, the only options to add under Computer are either local drives or mapped network drives. There is no way for me to add something from a UNC path. The method I used above was Add Data from Path...
I also found the following help article: Add layers and layer packages to a map—ArcGIS Pro | Documentation It is basically telling me I am doing things correctly but my point of contention is that I should be able to access files without having to type in the path every time. This just adds an extra step.
Gotcha Josh - This is one of the slightly trickier things with Pro than with ArcMap. Since Pro is organized around projects rather than single maps, the structure of saved folder locations, database connections, etc... is a little bit different.
Inside of the Catalog pane you can see 'Project, Portal, Favorites, History' tabs listed across the top. On the Favorites tab you can click on 'Add Item' in the upper right hand corner and click on 'Add Folder'. From there you can browse to a folder via UNC path or mapped drive and then save that folder connection under your Favorites. If you browse to the folder using a UNC path instead of a mapped drive, then every file that you add to a map in the future will be referenced via UNC path.
Once you add the folder to your favorites, you can then right click on the folder and add it to your current project. You also have the option of always adding it to new projects if this is a folder that you reference often and always want it available.
After you do that, then when you click the 'Add Data' button on the Map ribbon, that folder will be available under Project\Folders\FolderName in the tree on the left hand side. If you hover over the newly added folder, you will get a popup showing the path to the folder and you can see if it is using a UNC path or a mapped drive.
Clear as mud?
See the image below of my Add Data dialog box:
Well that makes sense. Thanks Brian. That works a lot better.
No problem! Glad you got it worked out.