PROBLEM
In the ArcGIS Server Administrator Directory, users with sufficient privileges can edit the service's item information when required. However, in some cases, when attempting to update a service's item information, the following error message is returned:
Error: class java.lang.String cannot be cast to class com.esri.arcgis.discovery.json.JSONArray (java.lang.String is in module java.base of loader ’bootstrap'; com.esri.arcgis.discovery.json.JSONArray is in unnamed module of loader java.net.URLClassLoader @ <location>)
The error message when the JSON output format is selected.
The error message when the HTML output format is selected.
While the changes are updated to the service's item information despite the error message, it is possible for this error to affect other operations performed on the service, such as running the exportSite operation and creating backups of an ArcGIS Enterprise deployment through the webgisdr utility.
The "tags" property values are not stored in an array in the service's item information JSON. For example, an error message is returned when the "tags" property values are identified as a single long string value surrounded by double quotation marks, as shown below.
"tags": "Test123, Test, March",
Format the "tags" property values in the correct JSON structure to resolve the issue.
https://<root>/services/<serviceName.serviceType>/iteminfo/edit
"tags": [ "<tag1>", "<tag2>", "<tag3>" ],
In this example, the "tags" property is edited to the correct JSON structure where the array stores three string values.
"tags": [ "Test123", "Test", "March" ],
Get help from ArcGIS experts
Download the Esri Support App