Elasticsearch java API[5.0] using problem

Please format your code using </> icon as explained in this guide. It will make your post more readable.

What is the stack trace?