Log4J2 exception when adding an user with the Artemis CLI

Solution Verified - Updated -

Issue

When trying to add an user via the Artemis CLI

bin/artemis user add  --user-command-user USERNAME  --user-command-password PASSWORD --role ROLE  --user user --password pass

We obtain the following error

Exception in thread "main" java.lang.ExceptionInInitializerError
        at org.apache.activemq.artemis.cli.Artemis.buildCommand(Artemis.java:287)
        at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:202)
        at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:167)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:157)
        at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:64)
Caused by: org.apache.logging.log4j.core.config.ConfigurationException: No type attribute provided for Appender log_file
....

Environment

  • A-MQ 7.12+

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content