Error Sending Text Message to ActiveMQ from Hawtio

Solution Verified - Updated -


  • apache-activemq-5.9.0.redhat-610379 (Standalone distribution)


I am unable to send a text message to ActiveMQ from the Hawtio console. The following error occurs:

javax.jms.JMSSecurityException: User name [null] or password is invalid.
    at org.apache.activemq.util.JMSExceptionSupport.create(
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(
    at org.apache.activemq.ActiveMQConnection.createSession(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    at java.lang.reflect.Method.invoke(
    at sun.reflect.misc.Trampoline.invoke(
    at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(


The Hawtio console packaged with ActiveMQ exposes operations to send messages to a destination. If you choose to use the "Send text message(java.lang.string)" method on a broker which requires authentication the JMSSecurityException will occur. Instead you should use the "Send text message(java.lang.string,java.lang.string,java.lang.string)" which allows for a username and password to be set.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.