Select to view content in your preferred language

ConvertWebMapToArcGISProject with secured services 11.2

945
3
01-30-2024 03:42 PM
DHighness
Occasional Contributor

I am trying to get ConvertWebMapToArcGISProject to work with secured mapserver services on our 11.2 Enterprise. The ArcGIS Servers are federated with portal using default authentication. I am using arcpy.ImportCredentials in my script and then arcpy.mp.ConvertWebMapToArcGISProject. This works fine in Pro. When I publish to ArcGIS Server and a Geoprocessing Task it always errors

on ConvertWebMapToArcGISProject. The ImportCredentials is accessing AGS files for server that are

functioning fine in Pro. The AGS files are using stored credentials.

These are some of the errors showing up in the Server log:

SEVEREJan 30, 2024, 4:21:22 PMError performing query operation Error handling service request :Illegal access: this web application instance has been stopped already. Could not load [META-INF/services/javax.xml.parsers.DocumentBuilderFactory]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.Rest
SEVEREJan 30, 2024, 4:21:10 PMError executing tool. ExportWebMap : PYTHON ERRORS: Traceback info: File "C:\arcgisserver\directories\arcgissystem\arcgisinput\Print\ExportWebMap.GPServer\extracted\cd\proexportwebmap\custom_export_webmap.py", line 66, in main result = arcpy.mp.ConvertWebMapToArcGISProject(json_str, map_temp) Error Info: Failed to create layer from service at https://server7.ggg.org/arcgis7/rest/services/Southeast/Blah_Results/MapServer. Failed to create layer from service at https://server7.ggg.org/arcgis7/rest/services/Southeast/Blah_Overlays/MapServer. ArcPy ERRORS: Failed to execute (ExportWebMap).Print/ExportWebMap.GPServer
0 Kudos
3 Replies
waterschapVallei_en_Veluwe
Occasional Contributor

Any progress on this issue? I got the same severe message as your first one.

Joey_NL
Occasional Contributor

Interestingly we've also just started getting the same first error as you, but not the second. interested to hear what the result was.

0 Kudos
TanuHoque
Esri Regular Contributor

hello all,

for the case mentioned above, you'd not need to create your custom print service with importCredentials(). Token based security is supported by default by all print services. If you see any issues with print service not able to print secured map/feature services, please reach out to Esri Support, as you know it gets much easier that way to debug issues like this.

Also, on .ags file, Pro doesn't allow storing credentials in an .ags file for a server that is federated to a portal.

I hope this helps.

Tanu

0 Kudos