List of usage examples for javax.management ReflectionException getMessage
public String getMessage()
From source file:com.flexive.shared.mbeans.FxCacheProxy.java
private FxCacheException newReflectionException(ReflectionException e) { return new FxCacheException("Could not invoke operation on FxCache (reflection error): " + e.getMessage(), e);// w w w. j a v a2 s.c o m }
From source file:org.jolokia.http.HttpRequestHandler.java
/** * Execute a single {@link JmxRequest}. If a checked exception occurs, * this gets translated into the appropriate JSON object which will get returned. * Note, that these exceptions gets *not* translated into an HTTP error, since they are * supposed <em>Jolokia</em> specific errors above the transport layer. * * @param pJmxReq the request to execute * @return the JSON representation of the answer. *//*from w ww . j a va 2 s . c o m*/ private JSONObject executeRequest(JmxRequest pJmxReq) { // Call handler and retrieve return value try { return backendManager.handleRequest(pJmxReq); } catch (ReflectionException e) { return getErrorJSON(404, e, pJmxReq); } catch (InstanceNotFoundException e) { return getErrorJSON(404, e, pJmxReq); } catch (MBeanException e) { return getErrorJSON(500, e.getTargetException(), pJmxReq); } catch (AttributeNotFoundException e) { return getErrorJSON(404, e, pJmxReq); } catch (UnsupportedOperationException e) { return getErrorJSON(500, e, pJmxReq); } catch (IOException e) { return getErrorJSON(500, e, pJmxReq); } catch (IllegalArgumentException e) { return getErrorJSON(400, e, pJmxReq); } catch (SecurityException e) { // Wipe out stacktrace return getErrorJSON(403, new Exception(e.getMessage()), pJmxReq); } catch (RuntimeMBeanException e) { // Use wrapped exception return errorForUnwrappedException(e, pJmxReq); } }