<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cannot invoke &amp;quot;com.esri.standardsql.query.Selection.getExpression()&amp;quot; because &amp;quot;&amp;lt;local6&amp;gt;.y&amp;quot; is null in Publishing and Managing Services Questions</title>
    <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1578692#M1338</link>
    <description>&lt;P&gt;Any solution for this?&amp;nbsp; It is still happening in 11.4.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2025 15:22:41 GMT</pubDate>
    <dc:creator>JakeNeedle</dc:creator>
    <dc:date>2025-01-24T15:22:41Z</dc:date>
    <item>
      <title>Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1513633#M1243</link>
      <description>&lt;P&gt;Following an upgrade from 11.1 to 11.3, our hosting server started throwing these errors.&lt;/P&gt;&lt;P&gt;Type: Severe&lt;/P&gt;&lt;P&gt;Message: "feature server..." Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&amp;lt;local6&amp;gt;.y" is null&lt;/P&gt;&lt;P&gt;Target: Rest&lt;/P&gt;&lt;P&gt;Machine: Hosting Server&lt;/P&gt;&lt;P&gt;Code: 9000 (Cannot access Admin API)&lt;/P&gt;&lt;P&gt;-- I am pulling these errors from the Admin API&lt;/P&gt;&lt;P&gt;Process: 11868.&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 17:20:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1513633#M1243</guid>
      <dc:creator>NoahFrazzini</dc:creator>
      <dc:date>2024-08-01T17:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Hosting Server: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1513646#M1244</link>
      <description>&lt;P&gt;There is another error code that the admin logs show.&lt;/P&gt;&lt;P&gt;Type: Warning&lt;/P&gt;&lt;P&gt;Message: Request for service'...' did not have adequate credentials&lt;/P&gt;&lt;P&gt;Target: Admin&lt;/P&gt;&lt;P&gt;Machine: Hosting Server&lt;/P&gt;&lt;P&gt;Code: 7331&lt;/P&gt;&lt;P&gt;Process: 11868&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 14:55:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1513646#M1244</guid>
      <dc:creator>NoahFrazzini</dc:creator>
      <dc:date>2024-08-01T14:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1516250#M1247</link>
      <description>&lt;P&gt;Hello Noah - Sorry to hear about your recent experience after upgrading to 11.3.&lt;/P&gt;&lt;P&gt;Can you share more information about other symptoms that are happening?&amp;nbsp;&lt;BR /&gt;- Is there a consistent time these errors are showing up? How frequently? What is the action that's occurring?&lt;BR /&gt;- What type of authentication are you using?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As you mentioned, getting this error while being able to access the Admin API seems strange.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2024 17:52:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1516250#M1247</guid>
      <dc:creator>JustinMallinckrodt</dc:creator>
      <dc:date>2024-08-07T17:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1518338#M1249</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2024 13:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1518338#M1249</guid>
      <dc:creator>NoahFrazzini</dc:creator>
      <dc:date>2024-08-12T13:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1554807#M1297</link>
      <description>&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 18:32:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1554807#M1297</guid>
      <dc:creator>LanceKirby2</dc:creator>
      <dc:date>2024-11-01T18:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1555392#M1298</link>
      <description>&lt;P&gt;I am getting the same error in my 11.3 server logs also "&lt;SPAN&gt;&amp;nbsp;Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&amp;lt;local6&amp;gt;.y" is null"&lt;/SPAN&gt;.&amp;nbsp; It appears mostly to be occurring on Hosted layers.&lt;/P&gt;&lt;P&gt;Any body have any solutions on this?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2024 14:08:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1555392#M1298</guid>
      <dc:creator>JakeNeedle</dc:creator>
      <dc:date>2024-11-05T14:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1557339#M1301</link>
      <description>&lt;P&gt;Hi, we just upgraded from 10.9.1 to 11.3 and are also seeing our logs flooded with this error&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 20:58:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1557339#M1301</guid>
      <dc:creator>Marc_Graham</dc:creator>
      <dc:date>2024-11-11T20:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1562914#M1308</link>
      <description>&lt;P&gt;Also found this error on a number of hosted logs with ArcGIS Enterprise 11.3 running on Azure "&lt;SPAN&gt;Hosted/&lt;EM&gt;Service_Name&lt;/EM&gt;/FeatureServer: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&amp;lt;local6&amp;gt;.y" is null&lt;/SPAN&gt;"&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 02:42:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1562914#M1308</guid>
      <dc:creator>johnjcarter</dc:creator>
      <dc:date>2024-11-27T02:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1564639#M1311</link>
      <description>&lt;P&gt;Same error here too.&amp;nbsp; Just upgraded to 11.4 from 10.9.1.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 13:57:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1564639#M1311</guid>
      <dc:creator>BillMoody</dc:creator>
      <dc:date>2024-12-04T13:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1573678#M1325</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;When it hit the line for the query, the script would spit the&amp;nbsp;'error': {'code': 10500, 'description': 'Cannot invoke "com.esri.sde.sdk.pe.engine.PeLinunit.getUnitFactor()" because "&amp;lt;local6&amp;gt;" is null'}&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;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.")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 19:06:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1573678#M1325</guid>
      <dc:creator>jb4ward</dc:creator>
      <dc:date>2025-01-08T19:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1578692#M1338</link>
      <description>&lt;P&gt;Any solution for this?&amp;nbsp; It is still happening in 11.4.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 15:22:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1578692#M1338</guid>
      <dc:creator>JakeNeedle</dc:creator>
      <dc:date>2025-01-24T15:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1591101#M1363</link>
      <description>&lt;P&gt;same problem here by updating from 11.2 to 11.4:&lt;/P&gt;&lt;P&gt;/configuredatastore.sh https://********:6443/arcgis siteadmin ******* /gisdata/arcgisdatastore/ --stores spatiotemporal&lt;BR /&gt;Configuring data store(s). Initial configuration may take a few minutes. When configuring an upgraded data store, this process may take several hours depending on the size of your data. Please wait...&lt;/P&gt;&lt;P&gt;Performing upgrade prerequisite checks on data stores...&lt;/P&gt;&lt;P&gt;Error encountered: Cannot invoke "com.esri.arcgis.discovery.json.JSONArray.length()" because "&amp;lt;local3&amp;gt;" is null&lt;/P&gt;&lt;P&gt;i will open a case by esri tommorow&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 14:57:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1591101#M1363</guid>
      <dc:creator>alexanderzitzmann</dc:creator>
      <dc:date>2025-03-19T14:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1597083#M1375</link>
      <description>&lt;P&gt;Any luck with Tech Support?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 14:09:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1597083#M1375</guid>
      <dc:creator>JakeNeedle</dc:creator>
      <dc:date>2025-03-19T14:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1597115#M1376</link>
      <description>&lt;P&gt;Unfortunately not, but I was able to solve the problem myself. In the OpenSearch configuration, localhost was set as the hostname.&lt;BR /&gt;I corrected this in the following files:&lt;BR /&gt;-spatiotemporal-config.json&lt;BR /&gt;-opensearch.yml&lt;BR /&gt;I also had to create a server certificate for OpenSearch itself and replace the node.pem and node-key.pem files (opensearch doesn't like wildcard certs and the cert must be the same like the hostname).&lt;BR /&gt;(Instructions:&lt;BR /&gt;&lt;A href="https://gist.github.com/cecilemuller/9492b848eb8fe46d462abeb26656c4f8" target="_blank"&gt;https://gist.github.com/cecilemuller/9492b848eb8fe46d462abeb26656c4f8&lt;/A&gt; )&lt;BR /&gt;Import the cross-certificate on the Geoevent server, and then everything worked.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 14:55:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1597115#M1376</guid>
      <dc:creator>alexanderzitzmann</dc:creator>
      <dc:date>2025-03-19T14:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1641314#M1435</link>
      <description>&lt;P&gt;Did you ever find a resolution to this? We are on 11.5 and the specific error you mentioned is still happening. So far we are only seeing it on hosted feature services.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 17:41:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1641314#M1435</guid>
      <dc:creator>Joshua-Young</dc:creator>
      <dc:date>2025-08-12T17:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1641315#M1436</link>
      <description>&lt;P&gt;Does Esri have a fix for&amp;nbsp;"Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&amp;lt;local6&amp;gt;.y" is null"?&lt;/P&gt;&lt;P&gt;We are on ArcGIS Enterprise 11.5 and are still seeing this error in the ArcGIS Server logs. It seems to only happen to hosted feature services and right now I am seeing getting the error while using some hosted feature services in a web scene. We are not getting errors for not adequate credentials.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 17:46:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1641315#M1436</guid>
      <dc:creator>Joshua-Young</dc:creator>
      <dc:date>2025-08-12T17:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot invoke "com.esri.standardsql.query.Selection.getExpression()" because "&lt;local6&gt;.y" is null</title>
      <link>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1641350#M1437</link>
      <description>&lt;P&gt;We narrowed it down to a web Mercator hosted feature service in a non-web Mercator scene. Try adding some services to a scene where the projections don’t match and see if you can trigger the error.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 19:03:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/publishing-and-managing-services-questions/cannot-invoke-quot-com-esri-standardsql-query/m-p/1641350#M1437</guid>
      <dc:creator>Marc_Graham</dc:creator>
      <dc:date>2025-08-12T19:03:23Z</dc:date>
    </item>
  </channel>
</rss>

