Problem with HornetQ in AS 6 M3
andy.miller May 21, 2010 5:53 PMI'm trying to test an application that I was running on EAP 5, on AS 6 M3. I have a single MDB sitting on a queue called replenish. During the startup of the server, I'm getting the following exception:
HornetQException[errorCode=105 message=Unable to validate user: null for check type CONSUME for address jms.queue.replenish]
at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:287) [:6.0.0.20100429-M3]
at org.hornetq.core.client.impl.ClientSessionImpl.internalCreateConsumer(ClientSessionImpl.java:1556) [:6.0.0.20100429-M3]
at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:447) [:6.0.0.20100429-M3]
at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:392) [:6.0.0.20100429-M3]
at org.hornetq.core.client.impl.DelegatingSession.createConsumer(DelegatingSession.java:201) [:6.0.0.20100429-M3]
at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:168) [:6.0.0.20100429-M3]
at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:287) [:6.0.0.20100429-M3]
at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:502) [:6.0.0.20100429-M3]
at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172) [:6.0.0.20100429-M3]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [:6.0.0.20100429-M3]
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780) [:6.0.0.20100429-M3]
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [:6.0.0.20100429-M3]
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800) [:6.0.0.20100429-M3]
at java.lang.Thread.run(Thread.java:636) [:1.6.0_18]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [:6.0.0.20100429-M3]
I have the following in hornetq-jms.xml:
<queue name="replenish">
<entry name="queue/replenish"/>
</queue>
At first I thought, because it says "validate user: null", that I have a user problem, so in looking at the documentation, I found out about the hornetq-users.xml file, so I defined the following in that file:
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq ../schemas/hornetq-users.xsd ">
<defaultuser name="guest" password="guest">
<role name="guest"/>
</defaultuser>
</configuration>
I can see this has been picked up, as when I looked at the queue in the admin console, its at the bottom under the roles section, with the user "guest", and it says that guest can send and consume messages.
That didn't change anything. The user still appears to be null, and not guest, even though I created guest as the default user.
Pointers in the right direction would be great. Thanks.