[jboss-user] [JCA/JBoss] - Issue with multiple SecureIdentityLoginModule(s) under a sin

dbush21 do-not-reply at jboss.com
Tue Oct 14 09:23:14 EDT 2008


I am attempting to setup two <login-module>(s) under a single <application-policy>. If I separate the login-module(s) under separate <application-policy>(s) it works but, it I attempt to put them under a single <application-policy> like:

	<application-policy name="annuity-services">
		
			<login-module
				code="org.jboss.resource.security.SecureIdentityLoginModule"
				flag="sufficient">
				<module-option name="username">USER_NAME</module-option>
				<module-option name="password">
					ENCRYPTED_PASSWORD
				</module-option>
				<module-option name="managedConnectionFactoryName">
					jboss.jca:service=LocalTxCM,name=JNDI_ABC
				</module-option>
			</login-module>
			<login-module
				code="org.jboss.resource.security.SecureIdentityLoginModule"
				flag="sufficient">
				<module-option name="username">USER_NAME</module-option>
				<module-option name="password">
					ENCRYPTED_PASSWORD
				</module-option>
				<module-option name="managedConnectionFactoryName">
					jboss.jca:service=LocalTxCM,name=JNDI_XYZ
				</module-option>
			</login-module>
		
	</application-policy>

it throws the following exception:

08:53:20,554 WARN  [JBossManagedConnectionPool] Throwable while attempting to ge
t a new connection: null
org.jboss.resource.JBossResourceException: No matching credentials in Subject!
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.g
etConnectionProperties(BaseWrapperManagedConnectionFactory.java:381)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.c
reateManagedConnection(LocalManagedConnectionFactory.java:149)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.cr
eateConnectionEventListener(InternalManagedConnectionPool.java:577)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.ge
tConnection(InternalManagedConnectionPool.java:262)
        at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BaseP
ool.getConnection(JBossManagedConnectionPool.java:500)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManage
dConnection(BaseConnectionManager2.java:341)
        at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedCo
nnection(TxConnectionManager.java:315)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateC
onnection(BaseConnectionManager2.java:396)
        at org.jboss.resource.connectionmanager.BaseConnectionManager2$Connectio
nManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wrapp
erDataSource.java:88)
        at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.get
Connection(InjectedDataSourceConnectionProvider.java:47)
        at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:
84)
        at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009
)
        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
a:1292)
        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Con
figuration.java:713)
        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFa
ctory(HibernatePersistence.java:127)
        at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnit
Deployment.java:246)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
...

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

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



More information about the jboss-user mailing list