rule based sld error while publishing geopacakge


Hi all,

When publishing a layer from geopackage, and the SLD contains a rule, then it may raise an exception while rendering. This happens randomly. I've found this behaviour with line and polygon layers so far.

The same sld works perfectly when publishing the equivalent table from other datasources, such as sql server.

Sample rule:

<ogc:Literal>UNDIFFERENTIATED FAULT</ogc:Literal>

Exception raised:

2018-05-24 16:19:42,773 TRACE [org.geotools.util] - Error applying the converter class org.geotools.util.GeometryConverterFactory$1 on (UNDIFFERENTIATED FAULT,class com.vividsolutions.jts.geom.MultiLineString) Unknown geometry type: UNDIFFERENTIATED
at org.geotools.geometry.jts.WKTReader2.readGeometryTaggedText(
at org.geotools.util.GeometryConverterFactory$1.convert(
at org.geotools.util.Converters.convert(
at org.geotools.util.Converters.convert(
at org.geotools.feature.FeatureBuilder.convert(

Looking at the code:

private Geometry readGeometryTaggedText() throws IOException, ParseException {
String type = null;

type = getNextWord();
}catch(IOException e){
return null;
}catch(ParseException e){
return null;

if (type.equalsIgnoreCase("POINT")) {
return readPointText();
else if (type.equalsIgnoreCase("LINESTRING")) {
return readLineStringText();
else if (type.equalsIgnoreCase("LINEARRING")) {
return readLinearRingText();
else if (type.equalsIgnoreCase("POLYGON")) {
return readPolygonText();
else if (type.equalsIgnoreCase("MULTIPOINT")) {
return readMultiPointText();
else if (type.equalsIgnoreCase("MULTILINESTRING")) {
return readMultiLineStringText();
else if (type.equalsIgnoreCase("MULTIPOLYGON")) {
return readMultiPolygonText();
else if (type.equalsIgnoreCase("GEOMETRYCOLLECTION")) {
return readGeometryCollectionText();
throw new ParseException("Unknown geometry type: " + type);

In conclusion, it seems that somehow the function is being given the data value related to the rule instead the geometry type. Please note the coincidence "Unknown geometry type: UNDIFFERENTIATED" and the literal in the rule.


Geoserver 2.13.0 deployed on Tomcat 9.0.7 + JRE 8u172. Windows server 2016


Andrea Aime
June 3, 2018, 7:08 AM

Thank you! Let us know about your progress.

Sebastián Vázquez Cascales
June 4, 2018, 12:34 AM

Hi there,

Finally I could manage to create the necessary files to reproduce the exception. Names and data are a little different than those formerly mentioned though. However, it is the same behaviour.

Hope this helps.

Best regards


Andrea Aime
June 10, 2018, 10:04 AM

Should have been solved, I can now display the map.
Would be useful if you could confirm, running a nightly build from:
Make sure you pick a build labelled June 11th or later.

Sebastián Vázquez Cascales
June 18, 2018, 11:35 AM

Thank you so much, Andrea.

I've tested the sample I gave you and it works! As it is stated, hopefully it will be included in version 2.13.2

Best regards


Andrea Aime
June 18, 2018, 11:48 AM

Yes, it should be part of 2.13.2


Andrea Aime


Sebastián Vázquez Cascales


Fix versions

Affects versions