Following an upgrade from 11.1 to 11.3, our hosting server started throwing these errors.
Type: Severe
Message: "feature server..." Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "<local6>.y" is null
Target: Rest
Machine: Hosting Server
Code: 9000 (Cannot access Admin API)
-- I am pulling these errors from the Admin API
Process: 11868.
I am unsure as to why this has started so any advice or insight would be greatly appreciated. All enterprise datastores are healthy and validated. This specifically started happening following the upgrade and have not seen any other documentation on the matter. Due to privacy concerns I cannot provide screenshots.
There is another error code that the admin logs show.
Type: Warning
Message: Request for service'...' did not have adequate credentials
Target: Admin
Machine: Hosting Server
Code: 7331
Process: 11868
Hello Noah - Sorry to hear about your recent experience after upgrading to 11.3.
Can you share more information about other symptoms that are happening?
- Is there a consistent time these errors are showing up? How frequently? What is the action that's occurring?
- What type of authentication are you using?
As you mentioned, getting this error while being able to access the Admin API seems strange.
The errors are constant and they pretty much fill the whole log on a daily basis. The action is usually a user attempting to host a service on the portal whether that be updating information or posting new features. And we are using IWA.
I'm getting a similar error after migrating my 11.3 portal to a new machine. Have you come across a cause of this issue?
I am getting the same error in my 11.3 server logs also " Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "<local6>.y" is null". It appears mostly to be occurring on Hosted layers.
Any body have any solutions on this?
Hi, we just upgraded from 10.9.1 to 11.3 and are also seeing our logs flooded with this error
Also found this error on a number of hosted logs with ArcGIS Enterprise 11.3 running on Azure "Hosted/Service_Name/FeatureServer: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "<local6>.y" is null"
Same error here too. Just upgraded to 11.4 from 10.9.1.
I was getting the same error, not sure if this is a fix all, but mine came down to a spatial reference issue. My script was selecting points by a work order in one layer, then looking for matching point numbers in another and updating the location for the matching point.
When it hit the line for the query, the script would spit the 'error': {'code': 10500, 'description': 'Cannot invoke "com.esri.sde.sdk.pe.engine.PeLinunit.getUnitFactor()" because "<local6>" is null'}
I updated the script to compare the spatial references, if they don't match then reproject. Code still needs optimization and more error handling, but hopefully this helps.
from arcgis.gis import GIS
from arcgis.features import FeatureLayer
from arcgis.geometry import Geometry, SpatialReference, project
"""SET WORK ORDER ID FIRST"""
workOrderID = 'workorderid'
# Connect to ArcGIS Online
gis = GIS("https://yoururl.com/arcgis", "username", "password")
# Get layers
# These points are the Trimble Data
layer_a_item = gis.content.get("yourItemIDa")
# These points will be moved, Use Field Collection Layer
layer_b_item = gis.content.get("yourItemIDb")
layer_a = layer_a_item.layers[0]
layer_b = layer_b_item.layers[0]
# Define the field names for point numbers
point_number_field1 = "field1"
point_number_field2 = "point_name"
# Query all points in Layer A
query1 = "workOrderID = '{}'".format(workOrderID)
layer_a_features = layer_a.query(where='1=1', out_fields="*", return_geometry=True)
# Get spatial references safely
sr_layer_a = layer_a.properties.get('extent', {}).get('spatialReference', {}).get('wkid')
sr_layer_b = layer_b.properties.get('extent', {}).get('spatialReference', {}).get('wkid')
# Fallback for spatial reference
if not sr_layer_a:
# sr_layer_a = layer_a.query(return_geometry=True).spatial_reference.wkid
sr_layer_a = layer_a.query(return_geometry=True).spatial_reference
print(sr_layer_a)
if not sr_layer_b:
# sr_layer_b = layer_b.query(return_geometry=True).spatial_reference.wkid
sr_layer_b = layer_b.query(return_geometry=True).spatial_reference
# Print spatial references for verification
print(f"Layer A Spatial Reference WKID: {sr_layer_a}")
print(f"Layer B Spatial Reference WKID: {sr_layer_b}")
# Ensure spatial reference objects
sr_layer_a = SpatialReference(sr_layer_a)
sr_layer_b = SpatialReference(sr_layer_b)
# Loop through each feature in Layer A
for feature_a in layer_a_features:
try:
point_number = feature_a.attributes.get(point_number_field1)
location_a = feature_a.geometry
if not point_number:
print("Skipping feature without a valid point number.")
continue
# Validate geometry
geometry_a = Geometry(location_a)
if not geometry_a.is_valid:
print(f"Invalid geometry for point number {point_number}. Skipping...")
continue
# Project geometry to match Layer B's spatial reference
if sr_layer_a != sr_layer_b:
geometry_a = project(geometries=[geometry_a], in_sr=sr_layer_a, out_sr=sr_layer_b)[0]
print(f"Projected geometry for point number {point_number} to match Layer B's spatial reference.")
# Explicitly set spatial reference
geometry_a.spatialReference = sr_layer_b
# Find matching feature in Layer B
query2 = f"{query1} AND {point_number_field2} = '{point_number}'"
layer_b_feature = layer_b.query(where=query2, out_fields="*", return_geometry=True).features
if layer_b_feature:
feature_b = layer_b_feature[0]
feature_b.geometry = geometry_a # Update geometry to match Layer A
# Submit the update
update_result = layer_b.edit_features(updates=[feature_b])
if update_result['updateResults'][0]['success']:
print(f"Successfully updated point number {point_number} in Layer B.")
else:
error_description = update_result['updateResults'][0].get('error', {}).get('description', 'Unknown error')
print(f"Failed to update point number {point_number}. Error: {error_description}")
else:
print(f"No matching point found in Layer B for point number {point_number}.")
except Exception as e:
print(f"Error processing point number {point_number}: {e}")
print("Geometry update process completed.")