[jboss-user] [JBoss Messaging] - javax.jms.JMSSecurityException: User null is NOT authenticated
Rajesh Kumar
do-not-reply at jboss.com
Thu Nov 17 16:13:07 EST 2011
Rajesh Kumar [http://community.jboss.org/people/jbossrulzz] created the discussion
"javax.jms.JMSSecurityException: User null is NOT authenticated"
To view the discussion, visit: http://community.jboss.org/message/637083#637083
--------------------------------------------------------------
I am getting the "User null is NOT authenticated" exception in JBoss after migrating from HSQLDB to Mysql for JBoss Messaging.
Configuration details:
JBoss Server 5.1 (4 node cluster)
Mysql 5.5
Heres what i did to migrate from HSQLDB to Mysql:
1. Copied the Mysql JDBC driver (mysql-connector-java-5.1.1.4-bin) to the lib folder of the nodes in JBoss.
2. Replacde the file hsqldb-ds.xml with mysql-ds.xml in the deploy folder in JBoss.
3. Replaced the file hsqldb-persistence-service.xml with mysqldb-persistence-service.xml in the messaging folder under deploy in JBoss.
4. Updated the file mysql-ds.xml to have the following:
<local-tx-datasource>
<jndi-name>defaultDS</jndi-name>
<connection-url>jdbc:mysql://mysql-hostname:3306/jbossdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>icdt</user-name>
<password>icdt</password>
<transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
<min-pool-size>20</min-pool-size>
<max-pool-size>100</max-pool-size>
<security-domain>MySqlDbRealm</security-domain>
5. Uncommented the "guest=guest" entry in the messaging-users file.
6. Added the following in the login-config file present in jboss/conf folder:
<application-policy name = "MySqlDbRealm">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
<module-option name = "principal">uname</module-option>
<module-option name = "userName">uname</module-option>
<module-option name ="password">pwd</module-option>
<module-option name ="managedConnectionFactoryName">jboss.jca:service=LocalTxCM,name=DefaultDS</module-option>
</login-module>
</authentication>
</application-policy>
7. Added a reference to the MySqlDbRealm in the mysql-ds file by adding the following:
+<security-domain>MySqlDbRealm</security-domain>+
+ 8. + Ensured that the <type-mapping>mySQL</type-mapping> property vale present in mysql-ds.xml file is the same as the <type-mapping> property in standardjbosscmp-jdbc.xml file.
I am guessing, i am missing some configuration which is causing the issue. Could someone educate me on what needs to be updated to fix this issue. I see a few people have the same issue, but was not able to find a concrete solution or a pointer to the root cause of the issue.
Thanks
Rajesh
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/637083#637083]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111117/9ea85d64/attachment-0001.html
More information about the jboss-user
mailing list