[jboss-user] [Datasource Configuration] - MySQL XA Datasource - "No matching credentials in Subject!"

Tim Haley do-not-reply at jboss.com
Fri Aug 5 15:50:27 EDT 2011

Tim Haley [http://community.jboss.org/people/ymaraner] created the discussion

"MySQL XA Datasource - "No matching credentials in Subject!""

To view the discussion, visit: http://community.jboss.org/message/619726#619726

I am working with JBoss AS 6.0.0.Final and 6.1.0-SNAPSHOT-68, they both have the same results. I have a MySQL database running on the localhost at port 56838 I configured an xa-datasource. When I test the datasource via the Admin Console, or when my application attemts to access the datasources, I get the following error: {noformat} 13:54:53,996 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null: org.jboss.resource.JBossResourceException: No matching credentials in Subject!         at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.getConnectionProperties(BaseWrapperManagedConnectionFactory.java:506) [:6.1.0-SNAPSHOT]         at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:191) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:648) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:272) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:690) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:403) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:380) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) [:6.1.0-SNAPSHOT]         at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941) [:6.1.0-SNAPSHOT]         at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) [:6.1.0-SNAPSHOT] {noformat} The Admin Console reports that a connection was obtained, but the exception above appears in the console output. My application is not expecting this exception, so it fails when it receives this exception. My configuration is as follows: MySQL-ds.xml: {code:xml} 
                test/jdbc/XADataSource        false                com.mysql.jdbc.jdbc2.optional.MysqlXADataSource        jdbc:mysql://localhost:56838/testjboss        false        TRANSACTION_READ_COMMITTED        test        test        XaTxDb        1        120        30000        false        0        30        0        5000        true                0                false        MySQL      {code} My login-config.xml file contains the following application-policy: {code:xml}       test test test jboss.jca:service=XATxCM,name=test/jdbc/XADataSource      {code} If I remove the user-name and password tags from the datasource, I get the same exception but I also get an error message from mysql: {noformat}  Access denied for user ''@'localhost' to database 'testjboss'{noformat} If restore the credentials in the datasource and remove the security-domain tag from the datasource and remove the corresponding application policy from login-config.xml, I get the same exception and the admin console reports that a connection was not obtained, but I don't get the mysql exception. I can get a no-transaction datasource to work, but only if I have both credentials in the datasource and a valid security-domain. Isn't the security-domain supposed to replace the credentials in the datasource? If I have credentials in the datasource I shouldn't need a security domain, should I? And what does "No matching credentials in Subject!" mean? I have been going around in circles for a couple of days now and any help would be greatly appreciated.

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110805/6398fb61/attachment.html 

More information about the jboss-user mailing list