Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

javax.jms.JMSSecurityException: Unable to validate user:

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(
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(
at org.hornetq.jms.client.HornetQConnection.authorize(
at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(
at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(
at com.wettpunkt.shopApp.beans.Sender.<init>(
at com.wettpunkt.shopApp.beans.Sender.main(
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.c.start(); = 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

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!