Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[geomesa-users] CQLException on 'id' with Geomesa Geoserver plugin

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:
https://osgeo-org.atlassian.net/browse/GEOT-2574
https://osgeo-org.atlassian.net/browse/GEOS-6634

And there's an older, also fixed geomesa issue referencing the ID filter in ECQL: https://locationtech.org/mhonarc/lists/geomesa-users/msg00195.html 

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:
https://github.com/locationtech/geomesa/blob/master/geomesa-accumulo/geomesa-accumulo-datastore/src/main/scala/org/locationtech/geomesa/accumulo/index/QueryPlanner.scala#L325

https://github.com/geotools/geotools/blob/master/modules/library/cql/ECQL.md
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
--



Back to the top