postgis/wms -- sql errors not reported
--------------------------------------
Key: GEOS-470
URL: http://jira.codehaus.org/browse/GEOS-470
Project: GeoServer
Type: Bug
Reporter: dblasby
Assigned to: dblasby
Fix For: 1.3.0 RC8
If the SQL generated by geoserver creates an error during a WMS GetMap operation, an error is not generated.
To reproduce:
logon to postgis:
update <table> set <geom column> = setsrid(<geom column>, -666);
This will cause an SRID missmatch when geoserver queries the database:
12172 [SEVERE] org.geotools.data.jdbc.JDBC1DataStore - Error Performing SQL query: SELECT "oid", bytea(AsBinary(force_2d("gen1"), 'XDR')), bytea(AsBinary(force_2d("gen2"), 'XDR')), bytea(AsBinary(force_2d("gen3"), 'XDR')) FROM "countries" WHERE ("gen1" && GeometryFromText('POLYGON ((-171.35991284179724 -101.9804193618616, -171.35991284179724 93.78028106904702, 172.07991247558633 93.78028106904702, 172.07991247558633 -101.9804193618616, -171.35991284179724 -101.9804193618616))', 4326) OR "gen2" && GeometryFromText('POLYGON ((-171.35991284179724 -101.9804193618616, -171.35991284179724 93.78028106904702, 172.07991247558633 93.78028106904702, 172.07991247558633 -101.9804193618616, -171.35991284179724 -101.9804193618616))', 4326) OR "gen3" && GeometryFromText('POLYGON ((-171.35991284179724 -101.9804193618616, -171.35991284179724 93.78028106904702, 172.07991247558633 93.78028106904702, 172.07991247558633 -101.9804193618616, -171.35991284179724 -101.9804193618616))', 4326))
The actual error message is:
ERROR: Operation on two geometries with different SRIDs
this is caused by the data being in srid -666 and geoserver doing a search based on (in this cases) 4326.
The actual error is unimportant, but:
1. the actual SQL error should at least be put in the log
2. the error should propagate back to the user. Currently it just returns a blank image with no mention of any problems.
--
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