I'm facing "NoNodeAvailableException" but doesn't now what I'm doing wrong!

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

Or use markdown style like:

```
CODE
```

I edited your post.

What are the elasticsearch server full logs please?
Are you running the java app from the same machine where elasticsearch is hosted?