Improve error reporting for Filters with wrong attribute names
--------------------------------------------------------------
Key: GEOS-1062
URL: http://jira.codehaus.org/browse/GEOS-1062
Project: GeoServer
Issue Type: Improvement
Affects Versions: 1.5.0
Reporter: Chris Holmes
Assignee: Andrea Aime
Fix For: 1.5.x, 1.6.0
If one puts in the wrong attributes in to a CQL error query things go very wrong. First you get a translator error, which always means some sort of nested problem.
After turning verbose exceptions on you get a bunch of junk and then:
Caused by: java.lang.RuntimeException: Exception occurred while computing reprojected bounds
at org.geotools.data.crs.ReprojectFeatureResults.getBounds(ReprojectFeatureResults.java:183)
at org.geotools.gml.producer.FeatureTransformer$FeatureTranslator.encode(FeatureTransformer.java:404)
at o
rg.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:610)
at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484)
at org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:292)
at org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:125)
... 42 more
Caused by: java.lang.ClassCastException: org.geotools.filter.AttributeExpressionImpl cannot be cast to org.geotools.filter.Filter
at org.geotools.filter.visitor.PostPreProcessFilterSplittingVisitor.getFilterPre(PostPreProcessFilterSplittingVisitor.java:125)
at org.geotools.data.jdbc.DefaultSQLBuilder.splitFilter(DefaultSQLBuilder.java:153)
at org.geotools.data.jdbc.DefaultSQLBuilder.getPreQueryFilter(DefaultSQLBuilder.java:136)
at org.geotools.data.jdbc.JDBC1DataStore.getFeatureReader(JDBC1DataStore.java:608)
at org.geotools.data.jdbc.JDBCFeatureCollection.reader(JDBCFeatureCollection.java:78)
at org.geotools.data.crs.ReprojectFeatureResults.reader(ReprojectFeatureResults.java:155)
at org.geotools.data.crs.ReprojectFeatureResults.getBounds(ReprojectFeatureResults.java:175)
... 47 more
We should be able to check much earlier if the attribute asked for is wrong. I believe we used to have this in some form? I think the old filter splitter let you know.
--
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