English

Error: ORA-13050: unable to construct spatial object

Error Message

Operations on Oracle Spatial layers cause an underlying database error similar to:

"ORA-13050: unable to construct spatial object
ORA-06512: at "MDSYS.SDO_3GL", line 1731
ORA-06512: at "MDSYS.SDO_3GL", line 1725
ORA-06512: at "MDSYS.SDO_3GL", line 1347"

This error may not be returned to the client directly. The error may be written to the sdedc_Oracle.log file, or the use of an SDEINTERCEPT may be needed to confirm this error. (See the related technical article for a description of how to run an SDEINTERCEPT.)

Cause

A nil SDO_Geometry object is being accessed through a filter predicate. This usually happens when a nil geometry is inserted into the Adds table of a versioned feature class.

Solution or Workaround

To correct this error, two actions may have to be taken. Upgrade the ArcGIS software to version 10.2 or later. A PL/SQL procedure also may have to be run to migrate values that are currently stored in the Adds table.

  1. Upgrade the ArcGIS client and geodatabase to version 10.2 or later.
  2. Retest the workflow. If the workflow no longer produces the error, do not proceed to Step 3.
  3. If the error is encountered after upgrading, run one of the following functions as the geodatabase administrator.

    • To migrate nil shapes in a specific table:

    Code:
    begin
    SDE.sdo_util.migrate_nil_shapes_to_current(<owner>,<table_name>,<geometry_column>);
    end;

    • To migrate nil shapes in all accessible tables:

    Code:

    begin
    SDE.sdo_util.migrate_nil_shapes_to_current;
    end;

    Note:
    These procedures do not check for permissions on the underlying tables before starting. The geodatabase administrator must have SELECT and UPDATE privileges granted on each table to run the functions successfully.

Related Information