Hi list,
I am trying to upgrade our GeoServer 1.5.4 installation to GeoServer 1.6.3. Our data are stored in an Oracle 10G database, so we are using the GeoServer Oracle plugin. The following WFS GetFeature request works fine in 1.5.4:
<wfs:GetFeature service=“WFS” version=“1.0.0” maxFeatures=“15” outputFormat=“GML2” xmlns:wfs=“http://www.opengis.net/wfs”>
<wfs:Query typeName=“limosa:VERENIGING109”>
<ogc:Filter xmlns:gml='http://www.opengis.net/gml’ xmlns:ogc='http://www.opengis.net/ogc’>
ogc:Intersects
ogc:PropertyNamelimosa:THE_GEOM</ogc:PropertyName>
<gml:Point srsName=“http://www.opengis.net/gml/srs/epsg.xml#28992”>
gml:coordinates185799.16932457592,575243.5864312415</gml:coordinates>
</gml:Point>
</ogc:Intersects>
</ogc:Filter>
</wfs:Query>
</wfs:GetFeature>
However, in 1.6.3, it fails with the following ServiceException:
error:Translator error
Translator error
Error reading Features
Could not aquire feature:org.geotools.data.DataSourceException: Error Performing SQL query: SELECT “ID”, “BEHEER”, “TOESTANDP1”, “TOESTANDP2”, “TOESTANDP3”, “TOESTANDP4”, “TOESTANDP5”, “TOESTANDP6”, “THE_GEOM” FROM “VERENIGING109” WHERE SDO_RELATE(“THE_GEOM”,MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(185592.16031008327,575211.241272727,NULL),NULL,NULL),‘mask=anyinteract querytype=WINDOW’) = ‘TRUE’
Error Performing SQL query: SELECT “ID”, “BEHEER”, “TOESTANDP1”, “TOESTANDP2”, “TOESTANDP3”, “TOESTANDP4”, “TOESTANDP5”, “TOESTANDP6”, “THE_GEOM” FROM “VERENIGING109” WHERE SDO_RELATE(“THE_GEOM”,MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(185592.16031008327,575211.241272727,NULL),NULL,NULL),‘mask=anyinteract querytype=WINDOW’) = ‘TRUE’
ORA-29902: error in executing ODCIIndexStart() routine
ORA-13208: internal error while evaluating [window SRID does not match layer SRID] operator
ORA-06512: at “MDSYS.SDO_INDEX_METHOD_10I”, line 286
Apparently, the SRID (28992, the Dutch national grid), gets lost somewhere between the WFS GetFeatureRequest and the SQL query in the Oracle Spatial plugin. If I modify the SQL statement to include the SRS code and then execute the query manually, the SQL statement returns the right feature.
If I update the user_sdo_geom_metadata table and set srid to null, the WFS GetFeature request returns the right feature as well, probably since window SRID (null) and layer SRID (also null) do match now. However, if I set SRID to null, the layer is no longer displayed when doing a WMS GetMap request for instance.
The problem seems similar to the one described here: http://www.nabble.com/WFS-T—Oracle-question-td16615276.html#a16615276. I have created a table as described in this post, to no avail. How can I make sure the SRID is inserted into the SQL select statement? Hopefully anyone can point me in the right direction.
We are using GeoServer 1.6.3 with gt2-oracle-spatial-2.4.2.jar and ojdbc14.jar, Tomcat 5.5 on Windows XP. The version of the Oracle database is 10.2.0.1.0.
Kind regards,
Bas Vanmeulebrouk.