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
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.