Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
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.
Issue Links
- depends upon
-
GEOT-980
Provide better classification for renderer errors
-
moving to 1.3.1