# Null pointer exception | co.elastic.clients.elasticsearch.\_types.InlineScript

**URL:** https://discuss.elastic.co/t/null-pointer-exception-co-elastic-clients-elasticsearch-types-inlinescript/350122
**Category:** Elasticsearch
**Tags:** painless
**Created:** [December 29, 2023, 10:15am UTC](https://discuss.elastic.co/t/null-pointer-exception-co-elastic-clients-elasticsearch-types-inlinescript/350122 "2023-12-29T10:15:47Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ravneet21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravneet21/32/122023_2.png) [@ravneet21](https://discuss.elastic.co/u/ravneet21)
#### Post date: [December 29, 2023, 10:15am UTC](https://discuss.elastic.co/t/null-pointer-exception-co-elastic-clients-elasticsearch-types-inlinescript/350122/1 "2023-12-29T10:15:47Z")

</div>

After migration from Rest High Level Client 7.17.1 to Elastic Java API client 8.6.2, I am getting nullpointer exception in InlineScript creation if any key's value is passed as null. Earlier with HLRC, the null values were accepted and were updated as is in the document on elastic server. But now this doesn't seem to be the case. This breaks the existing behavior. Is there any solution to this?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 26, 2024, 10:16am UTC](https://discuss.elastic.co/t/null-pointer-exception-co-elastic-clients-elasticsearch-types-inlinescript/350122/2 "2024-01-26T10:16:32Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
