dear all,
I'm evaluating Geomesa/Accumulo as a backend for Geoserver and so far, so reasonable, however I have come across an issue after ingesting a shapefile with a column named 'id' and then trying to access that data source as a WFS layer in Geoserver - Geomesa causes Geotools raises a CQLException on the "id" field. I thought it worth raising here to see if others have come across the problem, what insight others might have into the root causes, and whether this is in fact the right forum for the issue.
I found a couple of what seem to be related tickets in Geotools/Geoserver but they are both resolved:
Here's the contents of geoserver.log where geomesa is triggering the error:
org.geoserver.wfs.WFSException: Error occurred getting features ...
Caused by: java.lang.IllegalArgumentException: Unable to parse _expression_ id=id org.geotools.filter.text.cql2.CQLException: Encountered "id" at line 1, column 1.
Was expecting one of:
<STRING_LITERAL> ...
"true" ...
"false" ...
"point" ...
"linestring" ...
"polygon" ...
"multipoint" ...
"multilinestring" ...
"multipolygon" ...
"geometrycollection" ...
"envelope" ...
"(" ...
"[" ...
"-" ...
<INTEGER_LITERAL> ...
<FLOATING_LITERAL> ...
<DATE> ...
<DATE_TIME> ...
<IDENTIFIER> ...
Parsing : id.
at org.geotools.process.vector.TransformProcess.toDefinition(TransformProcess.java:185)
at org.locationtech.geomesa.accumulo.index.QueryPlanner$.setQueryTransforms(QueryPlanner.scala:324)
at org.locationtech.geomesa.accumulo.index.QueryPlanner$.configureQuery(QueryPlanner.scala:228)
at org.locationtech.geomesa.accumulo.data.AccumuloFeatureCollection.getSchema(AccumuloFeatureSource.scala:115)
at org.locationtech.geomesa.accumulo.data.AccumuloFeatureCollection.getSchema(AccumuloFeatureSource.scala:105)
So it's happening here:
states that ID is a predicate / reserved word in ECQL.
This is only happening if I ingest a shapefile with a column named 'id' - i can replace the column name, re-ingest and the same data appears fine via WFS.
cheers,
Jo
--