JBoss MQ Problems with JMS – User: null is NOT authenticated

If you ever come across the pesky error Message “User: null is NOT authenticated”, repeated every 20 sec or so, it’s a sure bet your login.conf does not match your default-ds entries.

The two files you’ll want to check are:

conf/login-config.xml and

deploy/mysql-ds.xml (or whatever db you use)

In our case, we had a separate Data source declaration for our MQ stuff:


<!– The jndi name of the DataSource, it is prefixed with java:/ –>
<!– Datasources are not available outside the virtual machine –>



and in login-config.xml, we still had the default:

<application-policy name = “jbossmq”>
<login-module code = “org.jboss.security.auth.spi.DatabaseServerLoginModule”
flag = “required”>
<module-option name = “unauthenticatedIdentity”>guest</module-option>
<module-option name = “dsJndiName”>java:/DefaultDS</module-option>
<module-option name = “principalsQuery”>SELECT PASSWD FROM JMS_USERS WHERE USERID=?</module-option>
<module-option name = “rolesQuery”>SELECT ROLEID, ‘Roles’ FROM JMS_ROLES WHERE USERID=?</module-option>

changing the dsJndiName line to

<module-option name = “dsJndiName”>java:/MySqlJMSDS</module-option>

did the trick.

This entry was posted in Enterprise Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s