# Low level java client not putting messages to elastic search

**URL:** <https://discuss.elastic.co/t/low-level-java-client-not-putting-messages-to-elastic-search/328757>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 28, 2023, 10:09pm UTC](https://discuss.elastic.co/t/low-level-java-client-not-putting-messages-to-elastic-search/328757 "2023-03-28T22:09:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tukaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tukaram/32/118944_2.png) [@Tukaram](https://discuss.elastic.co/u/Tukaram)\
**Post date:** [March 28, 2023, 10:09pm UTC](https://discuss.elastic.co/t/low-level-java-client-not-putting-messages-to-elastic-search/328757/1 "2023-03-28T22:09:10Z")

</div>

Hi,

I am using this version of elastic client.

```auto
 <dependency>
          <groupId>org.elasticsearch.client</groupId>
          <artifactId>elasticsearch-rest-client</artifactId>
          <version>7.17.9</version>
      </dependency>

```

I wrote standalone java app with password auth and it worked fine to put messages to ES.

I used same code but with ouath token, I am not getting any error while sending message but that message is not visible anywhere. I am not getting where its lost.  
Using performRequestAsync method in both cases.  
Only difference is When I use oauth, app runs under tomcat container.  
When I copied token and ran code locally, it gave me 201 - response but again, clueless on where is my doc.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2023, 7:31am UTC](https://discuss.elastic.co/t/low-level-java-client-not-putting-messages-to-elastic-search/328757/2 "2023-03-29T07:31:40Z")

</div>

What version of Elasticsearch are you using? How is the cluster configured?

I believe [oauth requires a commercial or trial license](https://www.elastic.co/subscriptions), so what is the output of the [get license API](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/get-license.html)?

---

<div class="post-metadata">

**Author:** ![Tukaram](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tukaram/32/118944_2.png) [@Tukaram](https://discuss.elastic.co/u/Tukaram)\
**Post date:** [March 29, 2023, 8:26am UTC](https://discuss.elastic.co/t/low-level-java-client-not-putting-messages-to-elastic-search/328757/3 "2023-03-29T08:26:47Z")

</div>

Hi,

I am using 7.17.3 and yes, its licensed and my other apps are successufully doing bulk request using high level client+oauth.  
Using Ouath + standalone app also worked for me in async mode but not working(no error /no callback call) when doing via tomcat webapp.

---

<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:** [April 26, 2023, 8:27am UTC](https://discuss.elastic.co/t/low-level-java-client-not-putting-messages-to-elastic-search/328757/4 "2023-04-26T08:27:37Z")

</div>

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