New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to access serialized exception with java-client #85
Comments
You are right, I forgot to adapt the Java Client's exception handling. What I could imagine is to add a Maybe for the Java Client Lib we could go even further and allow for ExceptionHandlers to be registered in the J4pClient so that sort of translation could be done automatically (but then probably only for RuntimeExceptions). If you like, you can implement it (assumed that you release it under the APL) and send me a pull request. I would happily integrate it. Please don't forget some unit-tests (there are already quite some from which you can take as blueprint) 😄 and, optionally, adapt the documentation in I could add it, too, but probably not this week. |
Great I will send a pull request by the end of this week. |
thanks for the pull request, will be in 1.1.1 |
We would like to utilize the "serializeException" option to access thrown exceptions. The problem is that we are unable to access serialized exception with java client included in jolokia.
When we query jolokia directly e.g.
and an exception is thrown, the exception is serialized under "error_value" field. This is what we expect, but when we query jolokia with its java client e.g.
We are unable to access serialized exception in the catch block via J4pRemoteException. J4pRemoteException does not include any functionality related to "error_value" field neither does processing of json response in org.jolokia.client.J4pClient (method: private J4pRemoteException validate(T pRequest, JSONObject pJsonRespObject)).
We would like the J4pRemoteException to provide either the whole json response object it was created from or just the "error_value" field as string so we can rebuild/rethrow the original exception .
If you agree and decide to provide this functionality, we are willing to implement it.
The text was updated successfully, but these errors were encountered: