diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java index 48b96c8263..ad888d0077 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/management/impl/ManagementServiceImpl.java @@ -550,7 +550,10 @@ public class ManagementServiceImpl implements ManagementService { @Override public void activated() { try { - messagingServer.addAddressInfo(new AddressInfo(managementNotificationAddress, RoutingType.MULTICAST)); + ActiveMQServer usedServer = messagingServer; + if (usedServer != null) { + usedServer.addAddressInfo(new AddressInfo(managementNotificationAddress, RoutingType.MULTICAST)); + } } catch (Exception e) { ActiveMQServerLogger.LOGGER.unableToCreateManagementNotificationAddress(managementNotificationAddress, e); }