This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/master by this push: new 9a1a2b1 ARTEMIS-2477 - create a less verbose and more descriptive warning when the native Netty jars are not present on the classpath new d888e91 This closes #2827 9a1a2b1 is described below commit 9a1a2b13692b8737b82a62725e8dc60fefb5a32d Author: Andy Taylor <andy.tayl...@gmail.com> AuthorDate: Mon Sep 9 11:11:21 2019 +0100 ARTEMIS-2477 - create a less verbose and more descriptive warning when the native Netty jars are not present on the classpath https://issues.apache.org/jira/browse/ARTEMIS-2477 --- .../activemq/artemis/core/client/ActiveMQClientLogger.java | 9 +++++++++ .../artemis/core/remoting/impl/netty/CheckDependencies.java | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java index 6156c15..700b863 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientLogger.java @@ -410,6 +410,15 @@ public interface ActiveMQClientLogger extends BasicLogger { format = Message.Format.MESSAGE_FORMAT) void confirmationNotSet(); + @LogMessage(level = Logger.Level.WARN) + @Message(id = 212075, value = "KQueue is not available, please add to the classpath or configure useKQueue=false to remove this warning", + format = Message.Format.MESSAGE_FORMAT) + void unableToCheckKQueueAvailabilityNoClass(); + + @LogMessage(level = Logger.Level.WARN) + @Message(id = 212076, value = "Epoll is not available, please add to the classpath or configure useEpoll=false to remove this warning", + format = Message.Format.MESSAGE_FORMAT) + void unableToCheckEpollAvailabilitynoClass(); @LogMessage(level = Logger.Level.ERROR) @Message(id = 214000, value = "Failed to call onMessage", format = Message.Format.MESSAGE_FORMAT) diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java index fb7da4b..c29b17c 100644 --- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java +++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java @@ -34,6 +34,9 @@ public class CheckDependencies { public static final boolean isEpollAvailable() { try { return Env.isLinuxOs() && Epoll.isAvailable(); + } catch (NoClassDefFoundError noClassDefFoundError) { + ActiveMQClientLogger.LOGGER.unableToCheckEpollAvailabilitynoClass(); + return false; } catch (Throwable e) { ActiveMQClientLogger.LOGGER.unableToCheckEpollAvailability(e); return false; @@ -43,6 +46,9 @@ public class CheckDependencies { public static final boolean isKQueueAvailable() { try { return Env.isMacOs() && KQueue.isAvailable(); + } catch (NoClassDefFoundError noClassDefFoundError) { + ActiveMQClientLogger.LOGGER.unableToCheckKQueueAvailabilityNoClass(); + return false; } catch (Throwable e) { ActiveMQClientLogger.LOGGER.unableToCheckKQueueAvailability(e); return false;