This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes javax.jms.JMSSecurityException: Unable to validate user: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "javax.jms.JMSSecurityException: Unable to validate user:" Watch "javax.jms.JMSSecurityException: Unable to validate user:" New topic

javax.jms.JMSSecurityException: Unable to validate user:

esmussein andersen

Joined: Jan 18, 2013
Posts: 1
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

I agree. Here's the link:
subject: javax.jms.JMSSecurityException: Unable to validate user:
It's not a secret anymore!