1 Reply Latest reply: Jan 16, 2014 5:54 AM by Stefan Jager RSS

    java Shapefile Converter error ORA-13050

    0cfe41c3-03a2-45b0-934d-312f25c05803

      Hi,

       

      i'm trying to convert a shape with the java converter and following the documention i make these steps:

       

      1. In our installation of ORACLE 11g we don't have the folder "[ORACLE_HOME]/md/". Then i've downloaded from here http://www.oracle.com/technetwork/database/options/spatialandgraph/downloads/software/sp-download-distlic-522138.html the required .jars
      2. I launch the java program with the next cmdline: java -classpath %ORACLE_HOME%\jdbc\lib\ojdbc6.jar;Y:\oracle11_libs\sdoutl.jar;Y:\oracle11_libs\sdoapi.jar oracle.spatial.util.SampleShapefileToJGeomFeature -h %HOST% -p %PORT% -s %SID% -u GISTEST -d GISTESTPRE -t edificis_area -f gis_edificacio_perimetre_base_polygon -r 23031 -g geom -o 0.0001

       

      While with points and lines there is no problem, with polygons it returns the next result:

       

      ...

      db_username: GISTEST

      db_password: GISTESTPRE

      db_tablename: edificis_area

      shapefile_name: .\historic_20020103\20020103_expHistoCarto\01_Global\EPSG23031\SHAPE\gis_edificacio_perimetre_base_polygon

      SRID: 23031

      db_geometry_column: geom

      tolerance: 0.0001

      Connecting to Oracle10g using...

      GISTEST, GISTESTPRE, edificis_area, .\historic_20020103\20020103_expHistoCarto\01_Global\EPSG23031\SHAPE\gis_edificacio_perimetre_base_polygon, null, 23031

      Dropping old table...

      java.sql.SQLSyntaxErrorException: ORA-00942: la tabla o vista no existe

       

       

      Creating new table...

      java.sql.SQLException: ORA-13050: no se ha podido construir el objeto espacial

      ORA-06512: en "MDSYS.SDO_MIGRATE", línea 316

      ORA-06512: en "MDSYS.SDO_MIGRATE", línea 597

       

       

      Record #1 not converted.

      java.sql.SQLException: ORA-13050: no se ha podido construir el objeto espacial

      ORA-06512: en "MDSYS.SDO_MIGRATE", línea 316

      ORA-06512: en "MDSYS.SDO_MIGRATE", línea 597

      ...

       

      The first thing that i found strange is the print of 'Oracle10g' and then we found the use of MDSYS.SDO_MIGRATE in the trace's error that it mean's the conversion between different versions of Oracle.

       

      Does anyone know where the problem is?


        • 1. Re: java Shapefile Converter error ORA-13050
          Stefan Jager

          If anyone else could take a look at this: It seems to be depending on the version. We are running into the exact same problem when using 11.2.0.3.0, but when using
          11.2.0.2.0 we can import the shape file without a problem. Both versions are the 64-bits version, btw.


          When trying a different approach using SQL Loader, we found that apparently there is an ordinate not quite right:


           

          Record 1: Rejected - Error on table "WOZ"."C_IMPORTED_DATA", column "GEOMETRY".SDO_ORDINATES.SDO_ORDINATES.

          error converting data

          ORA-01722: invalid number

           

          It is strange that one version can deal with this, but the other cannot. Is there anyone from Oracle who can take a look at this? We are now changing our strategy, but would prefer not to have to :-)

           

          Regards

          Stefan