diff --git a/src/main/java/org/datadog/jmxfetch/Instance.java b/src/main/java/org/datadog/jmxfetch/Instance.java index 7b27d877a..65bcebdbe 100644 --- a/src/main/java/org/datadog/jmxfetch/Instance.java +++ b/src/main/java/org/datadog/jmxfetch/Instance.java @@ -463,7 +463,8 @@ public Connection getConnection( /** Initializes the instance. May force a new connection.. */ public void init(boolean forceNewConnection) - throws IOException, FailedLoginException, SecurityException { + throws IOException, FailedLoginException, SecurityException, + MalformedObjectNameException { log.info("Trying to connect to JMX Server at " + this.toString()); connection = getConnection(instanceMap, forceNewConnection); log.info( @@ -496,7 +497,7 @@ public String toString() { } /** Returns a map of metrics collected. */ - public List getMetrics() throws IOException { + public List getMetrics() throws IOException, MalformedObjectNameException { // In case of ephemeral beans, we can force to refresh the bean list x seconds // post initialization and every x seconds thereafter.