3

I have an Oracle Spatial 11g geodatabase connected to GeoServer 2.8 through Oracle plugin. Some feature classes have field names with % (percent) characters, e.g. NAME%EN or AREA%KM2.

The layer shows up correctly and all its attributes are passed with GetFeatureInfo request. However, I cannot use SLD styling that is based on those fields (e.g. creating thematic map based on AREA%KM2 field).

Does anyone have experience with tables using field names with % characters? They are accepted by Oracle naming standards so I hoped GeoServer will handle them too.

7
  • Can you add the error message from the log file.
    – Ian Turton
    Nov 1, 2015 at 17:38
  • The basic error is as follows: 2015-11-01 20:57:11,475 INFO [geoserver.wms] - Request: getServiceInfo 2015-11-01 20:57:11,480 ERROR [geoserver.ows] - org.geoserver.platform.ServiceException: The requested Style can not be used with this layer. The style specifies an attribute of R$POP$DENSITY and the layer is: test:AREAS
    – jan_b
    Nov 1, 2015 at 19:59
  • I tried also with SLD Rest Service (docs.geoserver.org/stable/en/user/community/sldservice/…), which returned the following errors: 2015-10-31 02:56:55,419 ERROR [geoserver.rest] - Error generating Classification! 2015-10-31 02:56:55,419 DEBUG [geoserver.filters] - Compressing output for mimetype: text/plain
    – jan_b
    Nov 1, 2015 at 20:01
  • Your layer name must be a valid xml name see osgeo-org.1560.x6.nabble.com/… but % is illegal
    – Ian Turton
    Nov 1, 2015 at 20:10
  • Layer name does not contain "%", only some field names do. "%" is accepted by Oracle. Moreover, SLD XML file created based on such field names also validates correctly in Geoserver...
    – jan_b
    Nov 1, 2015 at 20:31

1 Answer 1

3

You might be affected by this ticket: https://osgeo-org.atlassian.net/browse/GEOT-5176 In other words, it might well be that we have to quote the attribute names when writing queries

2
  • Sounds like a similar issue. So far tried to quote the attributes inside SLD and it didn't help: <ServiceException>The requested Style can not be used with this layer. The style specifies an attribute of &quot;R$POP$DENSITY&quot; and the layer is: test:AREAS</ServiceException>
    – jan_b
    Nov 2, 2015 at 9:42
  • Only a code change can add quotes around the attributes Nov 11, 2015 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.