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

Sporadic NPE in DocumentParser.parseDynamicValue #17879

Closed
danielmitterdorfer opened this issue Apr 20, 2016 · 0 comments
Closed

Sporadic NPE in DocumentParser.parseDynamicValue #17879

danielmitterdorfer opened this issue Apr 20, 2016 · 0 comments
Labels
>test Issues or PRs that are addressing/adding tests

Comments

@danielmitterdorfer
Copy link
Member

Different tests are failing in CI with an NPE recently, e.g.:

For IngestClientIT we managed to get a stack trace:

java.lang.NullPointerException
    at org.elasticsearch.index.mapper.DocumentParser.parseDynamicValue(DocumentParser.java:819)
    at org.elasticsearch.index.mapper.DocumentParser.parseValue(DocumentParser.java:579)
    at org.elasticsearch.index.mapper.DocumentParser.innerParseObject(DocumentParser.java:412)
    at org.elasticsearch.index.mapper.DocumentParser.parseObjectOrNested(DocumentParser.java:392)
    at org.elasticsearch.index.mapper.DocumentParser.internalParseDocument(DocumentParser.java:112)
    at org.elasticsearch.index.mapper.DocumentParser.parseDocument(DocumentParser.java:80)
    at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:286)
    at org.elasticsearch.index.shard.IndexShard.prepareIndex(IndexShard.java:474)
    at org.elasticsearch.index.shard.IndexShard.prepareIndexOnPrimary(IndexShard.java:455)
    at org.elasticsearch.action.index.TransportIndexAction.prepareIndexOperationOnPrimary(TransportIndexAction.java:188)
    at org.elasticsearch.action.index.TransportIndexAction.executeIndexRequestOnPrimary(TransportIndexAction.java:196)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:339)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.index(TransportShardBulkAction.java:156)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.handleItem(TransportShardBulkAction.java:135)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:121)
    at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:70)
@danielmitterdorfer danielmitterdorfer added the >test Issues or PRs that are addressing/adding tests label Apr 20, 2016
jpountz added a commit to jpountz/elasticsearch that referenced this issue Apr 20, 2016
Boolean fields were not handled in `DocumentParser.createBuilderFromFieldType`.
This also improves the logic a bit by falling back to the default mapping of
the given type insteah of hard-coding every case and throws a better exception
than a NPE if no dynamic mappings could be created.

Closes elastic#17879
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests
Projects
None yet
Development

No branches or pull requests

1 participant