• Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.jms.JMSSecurityException: Unable to validate user:  RSS feed

esmussein andersen
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
H i everyone! i'm trying to made a message queue with hornetQ in JBOSS AS 7.1.1 with eclipse but i have always the same exception:

Exception in thread "main" javax.jms.JMSSecurityException: Unable to validate user: dave
at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:312)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:780)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:279)
at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:601)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:684)
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119)
at com.wettpunkt.shopApp.beans.Sender.<init>(Sender.java:27)
at com.wettpunkt.shopApp.beans.Sender.main(Sender.java:50)
Caused by: HornetQException[errorCode=105 message=Unable to validate user: dave]

I don't understand why because i have all the configuration ok, i think...

My steeps:

-I added the user dave as guest with the add-user. bat tool.

-I modified in JBOSS 7 standalone-full.xml with this lines:

<jms-queue name="testQueue">
<entry name="queue/test"/>
<entry name="java:jboss/exported/jms/queue/test"/>
<jms-queue name="PlayQueue">
<entry name="queue/PlayQueue"/>
<entry name="java:jboss/exported/jms/queue/PlayQueue"/>
<jms-topic name="testTopic">
<entry name="topic/test"/>
<entry name="java:jboss/exported/jms/topic/test"/>

-I runned JBOSS7 with standalone-full.xml

-I made one sender class with a main method and after jboss server starts, i run this main class.

This is the class:

import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.NamingException;

import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.jms.HornetQJMSClient;
import org.hornetq.api.jms.JMSFactoryType;
import org.hornetq.core.remoting.impl.netty.NettyConnectorFactory;

public class Sender {
private final ConnectionFactory cf;
private final Connection c;
private final Session s;
private final Destination d;
private final MessageProducer mp;

public Sender() throws NamingException, JMSException {
TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName());
cf = (ConnectionFactory) HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.CF, transportConfiguration);
c = cf.createConnection("dave", "mustaine");
d = HornetQJMSClient.createQueue("PlayQueue");

this.s = this.c.createSession(false, Session.AUTO_ACKNOWLEDGE);
this.mp = this.s.createProducer(this.d);

private void send(String string) throws JMSException {
TextMessage tm = this.s.createTextMessage(string);

private void close() throws JMSException {

* @param args
* @throws JMSException
* @throws NamingException
public static void main(String[] args) throws NamingException, JMSException {
Sender s = new Sender();
s.send("Ola ca estou eu!");


Help me please!! Thankssss

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!