SDO_UTIL.FROM_WKTGEOMETRY fails with ORA-29532 OutOfMemory error on large Geometry (Doc ID 1102474.1)

Last updated on AUGUST 17, 2010

Applies to:

Oracle Spatial - Version: 11.1.0.6 to 11.2.0.1 - Release: 11.1 to 11.2
Oracle Server - Enterprise Edition - 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

On a database with unicode character set, ie AL32UTF8, running Oracle Spatial java function SDO_UTIL.FROM_WKTGEOMETRY against a relatively large WKT geometry fails with Java Out Of Memory Error:

SQL> @large

reading large geometry wkt
read large geometry wkt length = 345084
converting large wkt geometry to sdo
declare
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception: java.lang.OutOfMemoryError
ORA-06512: at "MDSYS.SDO_UTIL", line 182
ORA-06512: at line 17

It works fine for smaller WKT geometries:

SQL> @small

declare
geom_wkt CLOB;
geom_sdo SDO_GEOMETRY;
begin
dbms_output.put_line('reading small geometry wkt');
select wkt into geom_wkt from geometry_data where name='SMALL';
dbms_output.put_line('read small geometry wkt length = '||LENGTH(geom_wkt));
end;
/

reading small geometry wkt
read small geometry wkt length = 1426
converting small wkt geometry to sdo
small geometry vertices = 40

PL/SQL procedure successfully completed.

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