[
https://issues.apache.org/jira/browse/METAMODEL-235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15252182#comment-15252182
]
ASF GitHub Bot commented on METAMODEL-235:
------------------------------------------
GitHub user kaspersorensen opened a pull request:
https://github.com/apache/metamodel/pull/94
METAMODEL-235: Fixed
This fixes METAMODEL-235 which was essentially about supporting null values
and missing values in the REST API of ElasticSearch.
I also expanded the unittests a bit in general around the relevant utility
class. It seemed that it didn't have a lot of corner cases covered so now I
added a couple at least.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kaspersorensen/metamodel METAMODEL-235
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/metamodel/pull/94.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #94
----
commit 6a669d7fb2190c6349f386f38c2bb515b7b80bfe
Author: kaspersorensen <[email protected]>
Date: 2016-04-21T16:44:37Z
METAMODEL-235: Fixed
----
> 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)