ST_CENTROID FAILS with ORA-20001: Unable to retrieve message

2022
4
11-26-2013 11:30 PM
StefanoIacovella
New Contributor III
Hello all,

I am finding issues with ST_* functions on a new ArcSDE installation.
The RDBMS is Oracle 11.2.0.3.0 64-bit Enterprise Edition on Linux.
We copied the libs to a folder mounted each node of the RAC.

[oracle@racgis1 geodb_lib]$ pwd
/u02/geodb_lib
[oracle@racgis1 geodb_lib]$ ls -l
total 11552
-rw-rw-rw- 1 grid oinstall 4603982 May 22  2012 libpe.so
-rw-rw-rw- 1 grid oinstall  429448 May 22  2012 libsg.so
-rw-rw-rw- 1 grid oinstall 5667163 May 22  2012 libst_shapelib.s

Then configured Oracle adding this in extproc.ora file:

SET EXTPROC_DLLS=ONLY:/u02/geodb_lib/libst_shapelib.so:/u02/geodb_lib/libpe.so;/u02/geodb_lib/libsg.so

To test functionality I created a table with a simple geometry:

CREATE TABLE geometry_test (gid smallint unique, g1 sde.st_geometry);
INSERT INTO GEOMETRY_TEST VALUES (3, sde.st_geomfromtext('polygon ((10.02 20.01, 11.92 35.64, 25.02 34.15, 19.15 33.94, 10.02 20.01))', 4326));
CREATE INDEX sa_idx ON geometry_test(g1) INDEXTYPE IS sde.st_spatial_index PARAMETERS('st_grids=1,3,0 st_srid=4326');

If I run some simple query it seems woking, so it seems that configuration is ok.

SQL> SELECT sde.st_astext(g1) FROM GEOMETRY_TEST;

SDE.ST_ASTEXT(G1)
--------------------------------------------------------------------------------
POLYGON  (( 10.02000000 20.01000000, 19.15000000 33.94000000, 25.02000000 34.150

SQL> SELECT sde.st_area(g1) FROM GEOMETRY_TEST;

SDE.ST_AREA(G1)
---------------
        63,8661

Bt if I run ST_CENTROID or ST_BUFFER it does not work:

SELECT sde.st_centroid(g1) FROM GEOMETRY_TEST
*
ERROR at line 1:
ORA-20001: Unable to retrieve message
ORA-06512: a "SDE.ST_GEOMETRY_SHAPELIB_PKG", line 325
ORA-06512: a "SDE.ST_GEOMETRY_OPERATORS", line 1398


Any hint?

Thank s for your attention

Stefano
0 Kudos
4 Replies
StefanoIacovella
New Contributor III
In this case I solved the issue double checking the libraries version.
On the Server there were 10.1 libraries while the ArcSDE catalog was 10.1 SP1.
Copying again the right version of libraries solved the issue.

Stefano
0 Kudos
VinceAngelo
Esri Esteemed Contributor
DLLs should also have execute permissions (chmod +x libs*.so).

- V
0 Kudos
StefanoIacovella
New Contributor III
DLLs should also have execute permissions (chmod +x libs*.so).

- V


Thanks for your fast reply.

Indeed when the Sysadmin copied again the dlls changed the mode and now is:

oracle@racgis1 geodb_lib]$ ls -ltr
total 19316
-rwxrwxr-x 1 oracle oinstall  448883 Aug 24  2012 libsg.so
-rwxrwxr-x 1 oracle oinstall 6897438 Aug 24  2012 libpe.so
-rwxrwxr-x 1 oracle oinstall 7301005 Aug 24  2012 libst_shapelib.so

So this seems the trick, but I wonder why before only some ST_* functions were working.
Is it the expected behaviour?

Thanks again for your support

Stefano
0 Kudos
VinceAngelo
Esri Esteemed Contributor
Not all of the ST_GEOMETRY functions require DLL support.  The ones that do will
make themselves known eventually if the DLL exposure is wrong.

- V
0 Kudos