pentaho/pentaho-kettle · error · KettleStepException
Unable to parse shape type
Error message
Unable to parse shape type [${shapeType}] : not yet implemented. What it means
ShapeFileReader.processRow throws this KettleStepException when a shape record has an ESRI shape type the step has no parsing branch for (the switch's default case). The shapefile format defines many geometry types, but this step only implements a subset; anything else is unparseable. The same message is also printed to stdout before throwing.
Solutions
- Identify the shape type in the .shp file (e.g. with ogrinfo -so or a GIS tool) and re-export/convert the data to a supported type such as Polygon or Polyline.
- Use a different input step (e.g. a GDAL/OGR-based or CSV export) for unsupported geometry types.
- Patch ShapeFileReader.processRow to add a case for the needed shape type and rebuild the plugin.
- Filter out or preprocess records with unsupported types before the step.
Example fix
// before
switch ( type ) {
case Shape.SHAPE_TYPE_POLYGON:
...
default:
throw new KettleStepException( "Unable to parse shape type ..." );
}
// after
switch ( type ) {
case Shape.SHAPE_TYPE_POLYGON:
...
case Shape.SHAPE_TYPE_POINT_Z: // newly supported
si = new ShapePointZ( content );
break;
default:
throw new KettleStepException( "Unable to parse shape type ..." );
} Defensive patterns
Strategy: validation
Validate before calling
int shapeType = si.getType();
Set<Integer> supported = Set.of( Shape.SHAPE_TYPE_POINT, Shape.SHAPE_TYPE_POLYGON, Shape.SHAPE_TYPE_POLYLINE );
if ( !supported.contains( shapeType ) ) {
throw new KettleException( "Unsupported shape type " + Shape.getEsriTypeDesc( shapeType ) + " — convert the file first" );
} Prevention
- Run ogrinfo -so file.shp to check the geometry type before pointing the step at it.
- Convert Z/M and MultiPatch geometries to planar types with ogr2ogr -nlt.
- Keep shapefiles in a documented, tested subset of types for your pipeline.
When it happens
Trigger: Processing a .shp whose shape header type (Shape.getEsriTypeDesc(si.getType())) is not one of the implemented types in the switch (e.g. PointM, PointZ, MultiPatch, MultiPoint variants). Occurs mid-transformation while iterating shapes via processRow.
Common situations: Users point the ShapeFileReader step at modern or exotic shapefiles (Z/M geometries, MultiPatch from 3D GIS exports) that contain geometry types the plugin was never extended to support.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- Error reading shape file
- shape type : not recognized! ( )
- Unable to clone row
- Unable to read from DBF file
- Unable to read from DBF file: no filename specfied
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/eeb3317ed62eb7aa.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/shapefilereader/core/src/main/java/org/pentaho/di/shapefilereader/ShapeFileReader.java:334
Object[] dbfData = si.getDbfData();
RowMetaInterface dbfMeta = si.getDbfMeta();
for ( int d = 0; d < dbfMeta.size(); d++ ) {
outputRow[ outputIndex++ ] = dbfData[ d ];
}
linesInput++;
// Put it out to the rest of the world...
try {
putRow( data.outputRowMeta, data.outputRowMeta.cloneRow( outputRow ) );
} catch ( KettleValueException e ) {
throw new KettleStepException( "Unable to clone row", e );
}
break;
default:
System.out.println(
"Unable to parse shape type [" + Shape.getEsriTypeDesc( si.getType() ) + "] : not yet implemented." );
throw new KettleStepException(
"Unable to parse shape type [" + Shape.getEsriTypeDesc( si.getType() ) + "] : not yet implemented." );
}
// Next shape please!
data.shapeNr++;
if ( ( linesInput % Const.ROWS_UPDATE ) == 0 ) {
logBasic( "linenr " + linesInput );
}
return retval;
}
public boolean init( StepMetaInterface smi, StepDataInterface sdi ) {
meta = (ShapeFileReaderMeta) smi;
data = (ShapeFileReaderData) sdi;
if ( super.init( meta, data ) ) {View on GitHub (pinned to f3058517a1)