[jboss-user] [Installation, Configuration & Deployment] - Re: No matching credentials in Subject Exception!

purushothamreddy.p do-not-reply at jboss.com
Tue Aug 25 09:06:06 EDT 2009


For your data source you need two <application-policy> tags.

One is for MySqlDS another is for MySqlDS1.

You cannot put them into one single 
<application-policy name="EncryptDBPassword">.

Try the following:

Your mysql-ds.xml file will be changed like this.

<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>MySqlDS</jndi-name>
  |     <connection-url>jdbc:mysql://192.168.48.227:3306/systemdatabase</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |      <min-pool-size>1</min-pool-size>
  |       <max-pool-size>20</max-pool-size>
  |  <security-domain>EncryptDBPassword</security-domain> 
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>
  |   </local-tx-datasource>
  |   <local-tx-datasource>
  |     <jndi-name>MySqlDS1</jndi-name>
  |     <connection-url>jdbc:mysql://192.168.48.227:3306/telephone_element1</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |      <min-pool-size>1</min-pool-size>
  |       <max-pool-size>20</max-pool-size>
  | <security-domain>EncryptDBPassword1</security-domain> 
  |     <metadata>
  |        <type-mapping>mySQL</type-mapping>
  |     </metadata>
  |   </local-tx-datasource>
  | </datasources> 

You can observe the brown color change in your mysql-ds.xml.

Then the login-config.xml file should be like this 


<application-policy name="EncryptDBPassword">
  |         <authentication>
  |             <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
  | 				  
  | 				<module-option name="username">root</module-option>
  |                 <module-option name="password">6f8e652f571678f2</module-option> 
  |                 <module-option name="managedConnectionFactoryName">jboss.jca:name=MySqlDS,service=LocalTxCM</module-option>
  |             </login-module>
  |         </authentication>
  |     </application-policy>
  | <application-policy name="EncryptDBPassword1">
  |  <authentication>
  |   <login-module code="org.jboss.resource.security.SecureIdentityLoginModule" flag="required">
  | 	  
  |   <module-option name="username">root</module-option>
  |   <module-option name="password">6f8e652f571678f2</module-option> 
  |   <module-option name="managedConnectionFactoryName">
  |        jboss.jca:name=MySqlDS1, service=LocalTxCM
  |   </module-option>
  |  </login-module>
  |  </authentication>
  | </application-policy>


The main reason for this exception is the application is not getting the MySqlDS1 connection from the connection pool. Because you have not configured MySqlDS1 in the SecureIdentityLoginModule.

Thanks
Purushotham

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4251477#4251477

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4251477



More information about the jboss-user mailing list