Details
Description
In an Oracle database I have created two views from attached GSML_MAPPEDFEATURE_SIMPLE.sql and ER_TEST.sql and added corresponding records into USER_SDO_GEOM_METADATA:
SELECT * FROM USER_SDO_GEOM_METADATA;
TABLE_NAME COLUMN_NAME DIMINFO SRID
-------------------------- --------------------- -------------------------------------------------------------------------------------------------------------------------- ----
ER_TEST LOCATION MDSYS.SDO_DIM_ELEMENT(MDSYS.SDO_DIM_ELEMENT(longitude,-180,180,0.000001),MDSYS.SDO_DIM_ELEMENT(latitude,-90,90,0.000001)) 8311
GSML_MAPPEDFEATURE_SIMPLE LOCATION MDSYS.SDO_DIM_ELEMENT(MDSYS.SDO_DIM_ELEMENT(longitude,-180,180,0.000001),MDSYS.SDO_DIM_ELEMENT(latitude,-90,90,0.000001)) 8311
In fact, ER_TEST view is a simplified version of the GSML_MAPPEDFEATURE_SIMPLE and exposes just two fields (ID and SDO_GEOMETRY). In both cases the data is coming from the same table, the same filter conditions and joins are applied.
Then I have successfully created two layers in GeoServer with absolutely the same settings. Simple GetFeature WFS requests like http://localhost:9090/geoserver/wfs?request=GetFeature&typeName=pirsa:ER_TEST&maxFeatures=10 work perfectly in both cases. But for some reason the WMS is only producing correct output for GSML_MAPPEDFEATURE_SIMPLE feature type. When attempting to query WMS for ER_TEST (http://localhost:9090/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=pirsa:ER_TEST&styles=&bbox=129.102,-38.058,141.0,-26.003&width=505&height=512&srs=EPSG:4283&format=image/png) GeoServer generates an error (see Exception.txt).
What is so different in these two so similar views that causes this unexpected behaviour?
I honestly have no idea, you seem to have declared the view metadata properly for both columns so GeoServer should be able to pick it up.
Have you tried with more recent versions of GeoServer, is the problem still reproducable?
If so I guess I'll need a sql script allowing me to setup the same situation on my Oracle XE install so that I can debug it step by step, or else, a VPN connection to your database.