11g SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT crashes on 3D layers with NULL geometry (Doc ID 1091158.1)

Last updated on JUNE 17, 2011

Applies to:

Oracle Spatial - Version: 11.1.0.6 and later   [Release: 11.1 and later ]
Oracle Spatial - Version: 11.1.0.6 to 11.2.0.1   [Release: 11.1 to 11.2]
Information in this document applies to any platform.

Symptoms

SDO_GEOM.VALIDATE_LAYER_WITH_CONTEXT fails when a 3D geometry is NULL:

SQL> CREATE TABLE Point_3D
  (
  ID NUMBER(10) NOT NULL,
  GEOM MDSYS.SDO_GEOMETRY
  );

Table created.

SQL> INSERT INTO USER_SDO_GEOM_METADATA VALUES (
  'Point_3D',
  'GEOM',
  MDSYS.SDO_DIM_ARRAY(
  MDSYS.SDO_DIM_ELEMENT('X',-10, 1000000, 0.0005),
  MDSYS.SDO_DIM_ELEMENT('Y',-10, 1000000, 0.0005),
  MDSYS.SDO_DIM_ELEMENT('Z',-10, 1000, 0.0005)
  ),
  NULL
  );

1 row created.

SQL>
SQL> -- Insert NULL geometry
SQL> insert into Point_3D (id, geom) values (1, NULL);

1 row created.

SQL>
SQL> CREATE TABLE VAL_RESULTS
 (
  KEY ROWID,
  RESULT VARCHAR2(1000 BYTE)
  );

Table created.

SQL>
SQL> -- Layer validation crashes
SQL> call sdo_geom.VALIDATE_LAYER_WITH_CONTEXT('Point_3D', 'GEOM', 'VAL_RESULTS');
call sdo_geom.VALIDATE_LAYER_WITH_CONTEXT('Point_3D', 'GEOM', 'VAL_RESULTS')
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.NullPointerException
ORA-06512: at "MDSYS.SDO_3GL", line 608
ORA-06512: at "MDSYS.SDO_GEOM", line 2662
ORA-06512: at line 1


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms