Kasper Sørensen created METAMODEL-235:
-----------------------------------------
Summary: NPE in REST ElasticSearch connector
Key: METAMODEL-235
URL: https://issues.apache.org/jira/browse/METAMODEL-235
Project: Apache MetaModel
Issue Type: Bug
Affects Versions: 4.5.1
Reporter: Kasper Sørensen
I'm working with the new REST ElasticSearch connector but when querying some
fields I experience an exception like this:
{code}
ERROR 13:56:51.528 [AWT-EventQueue-0] DataSetWindow - Unexpected error occurred
while building DataSetWindow contents
java.lang.NullPointerException
at
org.apache.metamodel.elasticsearch.rest.JestElasticSearchUtils.getDataFromColumnType(JestElasticSearchUtils.java:61)
at
org.apache.metamodel.elasticsearch.rest.JestElasticSearchUtils.createRow(JestElasticSearchUtils.java:50)
at
org.apache.metamodel.elasticsearch.rest.JestElasticSearchDataSet.getRow(JestElasticSearchDataSet.java:126)
at
org.apache.metamodel.data.DataSetTableModel.materialize(DataSetTableModel.java:86)
at
org.apache.metamodel.data.DataSetTableModel.getRowCount(DataSetTableModel.java:78)
at
org.jdesktop.swingx.sort.TableSortController.setModel(TableSortController.java:62)
at
org.jdesktop.swingx.sort.TableSortController.<init>(TableSortController.java:49)
at org.jdesktop.swingx.JXTable.createDefaultRowSorter(JXTable.java:1746)
at org.jdesktop.swingx.JXTable.setModel(JXTable.java:1647)
at org.datacleaner.widgets.table.DCTable.setModel(DCTable.java:156)
at org.datacleaner.windows.DataSetWindow$2.done(DataSetWindow.java:161)
{code}
I have a hunch this might be because those fields are not defined in some of
the documents of the index. And since it's a NPE I guess it's just a matter of
us not handling the "field missing" scenario.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)