[Geoserver-devel] [jira] (GEOS-5841) No values for singleChar escapeChar causes ERROR event

Jonathan Moules created BugGEOS-5841
No values for singleChar escapeChar causes ERROR event

Issue Type:

BugBug

Affects Versions:

2.3.2

Assignee:

Andrea Aime

Created:

04/Jun/13 10:54 AM

Description:

I had an SLD where I had a “propertyIsLike” defined thus:

<ogc:PropertyIsLike wildCard=“*” singleChar=“” escapeChar=“”>

Note the lack of value for singleChar and escapeChar - I didn’t want them defined. However, while this passed validation, GeoServer errors out when it comes to rendering it. WildCard may also do this, or it may just be one of them - didn’t test all permutations.

java.lang.RuntimeException: java.io.IOException
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:168)
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:59)
at org.geotools.renderer.lite.StreamingRenderer.drawPlain(StreamingRenderer.java:2475)
at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:2045)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:829)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:491)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:255)
at org.geoserver.wms.map.RenderedImageMapOutputFormat.produceMap(RenderedImageMapOutputFormat.java:127)
at org.geoserver.wms.GetMap.executeInternal(GetMap.java:466)
at org.geoserver.wms.GetMap.run(GetMap.java:201)
at org.geoserver.wms.GetMap.run(GetMap.java:111)
at org.geoserver.wms.DefaultWebMapService.getMap(DefaultWebMapService.java:356)
at sun.reflect.GeneratedMethodAccessor236.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)

Caused by: java.io.IOException
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:610)
at org.geotools.data.store.ContentFeatureSource.getReader(ContentFeatureSource.java:562)
at org.geotools.data.store.ContentFeatureCollection.features(ContentFeatureCollection.java:165)
… 111 more

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
at java.lang.String.charAt(Unknown Source)
at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:500)
at org.geotools.filter.LikeFilterImpl.accept(LikeFilterImpl.java:665)
at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:598)
at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:576)
at org.geotools.filter.OrImpl.accept(OrImpl.java:52)
at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:598)
at org.geotools.data.jdbc.FilterToSQL.visit(FilterToSQL.java:546)
at org.geotools.filter.AndImpl.accept(AndImpl.java:65)
at org.geotools.data.jdbc.FilterToSQL.encode(FilterToSQL.java:244)
at org.geotools.data.jdbc.FilterToSQL.encodeToString(FilterToSQL.java:273)
at org.geotools.jdbc.JDBCDataStore.filter(JDBCDataStore.java:2993)
at org.geotools.jdbc.JDBCDataStore.selectSQLPS(JDBCDataStore.java:3079)
at org.geotools.jdbc.JDBCFeatureSource.getReaderInternal(JDBCFeatureSource.java:573)
… 113 more

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Jonathan Moules

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)