# Cannot find symbol IMMEDIATE

**URL:** <https://discuss.elastic.co/t/cannot-find-symbol-immediate/173919>\
**Category:** Elasticsearch\
**Created:** [March 26, 2019, 12:05pm UTC](https://discuss.elastic.co/t/cannot-find-symbol-immediate/173919 "2019-03-26T12:05:59Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![utkarsh](https://avatars.discourse-cdn.com/v4/letter/u/e9bcb4/32.png) [@utkarsh](https://discuss.elastic.co/u/utkarsh)\
**Post date:** [March 26, 2019, 1:47pm UTC](https://discuss.elastic.co/t/cannot-find-symbol-immediate/173919/3 "2019-03-26T13:47:09Z")

</div>

By it did not work, I mean that the error "IMMEDIATE variable could not be found" still persists even after using setRefrreshPolicy(RefreshPolicy.IMMEDIATE).  
During initial upgrades I was trying with Rest client but then I was facing some issue so I decided to stay with Transport client as suggested by Tim Vernum in this post-

> [@Xpack with elasticsearch java rest client](https://discuss.elastic.co/t/xpack-with-elasticsearch-java-rest-client/160379):
>
> Updating elastic to 5.x from 2.x needs shield security to be replaced with x-pack security and java Transport client with java Rest-High-Level client/Low-Level-Client. Where can i find the information on how to use xpack with elasticsearch java rest client for version 5.6.2 and If no such information is present then how do i do it?(Because earlier I was providing shield username and password to java Transport client in my code and now with java Rest client coming into picture, i am not able to …

---

_[View the full topic](https://discuss.elastic.co/t/cannot-find-symbol-immediate/173919)._
