Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null pointer exception when property value is null or empty object in GeoJSON file #22

Open
dlutz2 opened this issue Jul 20, 2020 · 1 comment

Comments

@dlutz2
Copy link

dlutz2 commented Jul 20, 2020

The plugin throws a null pointer error when it encounters a GeoJSON property which is null or an empty object:

"properties": {
  "property": null
}

or

"properties": {
  "property": {}
}

The exception as seen in the Kettle log:

2020/07/20 01:04:24 - GIS File input.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : Unexpected error
2020/07/20 01:04:24 - GIS File input.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : java.lang.NullPointerException
2020/07/20 01:04:24 - GIS File input.0 - 	at com.atolcd.pentaho.di.gis.io.features.FeatureConverter.getRowMeta(FeatureConverter.java:149)
2020/07/20 01:04:24 - GIS File input.0 - 	at com.atolcd.pentaho.di.trans.steps.gisfileinput.GisFileInputMeta.getFields(GisFileInputMeta.java:222)
2020/07/20 01:04:24 - GIS File input.0 - 	at com.atolcd.pentaho.di.trans.steps.gisfileinput.GisFileInput.processRow(GisFileInput.java:65)
2020/07/20 01:04:24 - GIS File input.0 - 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2020/07/20 01:04:24 - GIS File input.0 - 	at java.lang.Thread.run(Thread.java:748)

Using Kettle 8.3.0.0-371 and GIS Plugin V1.3.0

@dlutz2
Copy link
Author

dlutz2 commented Jul 20, 2020

Looked at this further, the null pointer exception will also occur if a property is an array or a (not-null) object

@dlutz2 dlutz2 changed the title Null pointer exception when property value is null or empty object Null pointer exception when property value is null or empty object in GeoJSON file Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant