Skip to content

IndexNotFoundException[no such index]

I was running my first elasticsearch test case, I am using Java as the solution perspective to do elasticsearch experiment. it works perfectly fine in eclipse Debug Mode, the debug mode result: But when I try this on in normal Run application mode, I am getting the following exception and I have no idea at al…

How to get response body in Zuul post filter?

How it is possible to read a response body while using Zuul as a proxy in post filter? I am trying to call the code like this: Answer I’ve managed to overcome this. The solution consists of 4 steps: Read ctx.getResponseDataStream() into a ByteArrayOutputStream Copy OutputStream to 2 InputStreams. Use on…

how to get Indian Time Standard from in java?

I want to know date and time in Indian standard time and I don’t want to use my system time and date. I have never used Network Transfer Protocol (NTP) but by browsing through internet i think ntp can do the jop. Answer An easier option might be to use JodaTime, so that you could do something like this

javadoc @hide can’t work

According to the link, i wrote the following code: When i use the command to generate the doc: The doc still have the myMethod item. So how to hide the myMethod? What did i miss ? Answer You are using a Doclava tag, but are generating the API documentation using the standard doclet. Building Doclava The Docla…

junit test for stateless ejb + jpa

I would like to write a junit test for my stateless ejb + jpa demo code. I think it is actually not a junit test, it is an integration test. I have a stateless ejb with an injected EntityManager and PostgreSQL database server is used. I use CDI (Spring is not used in my project) and EclipseLink with a persist…