Bulk Request failing with Not Found 404. But single request works fine.

classic Classic list List threaded Threaded
3 messages Options
Mike Mike
Reply | Threaded
Open this post in threaded view
|

Bulk Request failing with Not Found 404. But single request works fine.

Using the java client, I am attempting to do a bulk request.  However I get a J4pRemoteException Not Found with a status code of 404.  Looking at the exception, the request is null.  My code looks like:
List<J4pResponse> responses = client.execute(requests);

If I do the following it works fine and the response is as expected:
for(J4pRequest req : requests) {
    J4pResponse resp = client.execute(req);
}

But I'd rather limit the traffic and submit one bulk request and get back 1 bulk response.
Mike Mike
Reply | Threaded
Open this post in threaded view
|

Re: Bulk Request failing with Not Found 404. But single request works fine.

I figured out what the error was.  I originally did not include a trailing backslash in my url.  The original url was:
http://localhost:8778/jolokia

I had to change it to:
http://localhost:8778/jolokia/
roland roland
Reply | Threaded
Open this post in threaded view
|

Re: Bulk Request failing with Not Found 404. But single request works fine.

In reply to this post by Mike
Sorry for the later reply. Could you post a sample code how you do the bulk request ?

Could you please open an issue at https://github.com/rhuss/jolokia/issues ? Its easier to track there.

thanks ...
... roland
... roland