oracle 9i not working: DESC tablename returns SDO_GEOMETRY() which is unknown
-----------------------------------------------------------------------------
Key: GEOS-1715
URL: http://jira.codehaus.org/browse/GEOS-1715
Project: GeoServer
Issue Type: Bug
Components: Oracle
Affects Versions: 1.6.0-RC3
Environment:
« Hide
Client:
Microsoft Windows XP [versie 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
GeoServer 1.6.0-RC3 - http://downloads.sourceforge.net/geoserver/geoserver-1.6.0-RC3.exe?modtime=1200549612&big_mirror=0
GeoServer-1.6.0-RC3-oracle-plugin - http://downloads.sourceforge.net/geoserver/geoserver-1.6.0-RC3-oracle-plugin.zip?modtime=1200550429&big_mirror=0
Server:
Oracle91 Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0
Reporter: Eduard Witteveen
Assignee: Andrea Aime
SEE BUG ON GEOTOOLS: http://jira.codehaus.org/browse/GEOT-1689
When i try to add a new FeatureType in geoserver, based on the oracle connection, the type for my field of type: SDO_GEOMETRY is not detected. In the edit FeatureType (http://localhost:8080/geoserver/config/data/typeSelectSubmit.do ) screen, the datatype is not detected.
The console does display the following message:
23 Jan 17:13:50 WARN [data.oracle] - Could not determine geometry class for [MY_TABLE.GEOM]
When i looked into the code ( org.geotools.data.oracle.SqlStatementEncoder line: 82: TYPE_MAPPINGS.put("MDSYS.SDO_GEOMETRY", Geometry.class ); ) , i saw detection of the type, so i figured that it was a "good thing" to see what the type was in the database.
DESCRIBE MY_TABLE
Name Null Type
------------------------------ -------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
.....
GEOM SDO_GEOMETRY()
.....
1.
1. rows selected
Well, first thing i realised, was to see what kind of type i defined the field, so i looked at the creation script:
CREATE TABLE MY_TABLE (
...
GEOM MDSYS.SDO_GEOMETRY
...
);
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('MY_TABLE', 'GEOM',
MDSYS.SDO_DIM_ARRAY
(MDSYS.SDO_DIM_ELEMENT('X', -7000.000000000, 300000.000000000,
0.000000100),
MDSYS.SDO_DIM_ELEMENT('Y', 289000.000000000, 629000.000000000,
0.000000100)
),
90112);
CREATE INDEX MY_TABLE_GI ON MY_TABLE(GEOM)
INDEXTYPE IS MDSYS.SPATIAL_INDEX;
So, i assume that this was done correctly in oracle
This leaves me at the point where i can change the code, i COULD add the TYPE_MAPPINGS.put("SDO_GEOMETRY()", Geometry.class ); after TYPE_MAPPINGS.put("MDSYS.SDO_GEOMETRY", Geometry.class ); but i have some difficulties first compiling geoserver with maven (from my side ) and i need to use a binairy-version in my current project.
For more information, feel free to contact me
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira