[jboss-user] [JCA/JBoss] - javax.resource.spi.SecurityException: No Password credential

lhunath do-not-reply at jboss.com
Mon Apr 14 03:41:26 EDT 2008


I've been migrating from JBossMQ to JBossMessaging.  Just after finishing the configuration; I hit a wall on the following exception.  I was redirected to this forum for assistance - I hope I came to the right place.

Let me know if you need any more info to make a relevant diagnose.

The Stack Trace and preceding TRACE level log messages:

09:26:56,682 TRACE [SecurityAssociation] popSubjectContext, sc=org.jboss.security.SecurityAssociation$SubjectContext at 1c7f72d principal=null,subject=null}
  | 09:26:56,682 TRACE [SecurityAssociation] getPrincipal, principal=null
  | 09:26:56,682 TRACE [SecurityAssociation] pushSubjectContext, subject=null, sc=org.jboss.security.SecurityAssociation$SubjectContext at 174bd22{principal=null,subje
  | 09:26:56,722 TRACE [SecurityAssociation] getPrincipal, principal=null
  | 09:26:56,724 TRACE [messaging] Begin isValid, principal:null, cache info: null
  | 09:26:56,724 TRACE [messaging] defaultLogin, principal=null
  | 09:26:56,724 TRACE [XMLLoginConfigImpl] Begin getAppConfigurationEntry(messaging), size=16
  | 09:26:56,724 TRACE [XMLLoginConfigImpl] End getAppConfigurationEntry(messaging), authInfo=AppConfigurationEntry[]:
  | [0]
  | LoginModule Class: org.jboss.security.auth.spi.DatabaseServerLoginModule
  | ControlFlag: LoginModuleControlFlag: required Options:name=rolesQuery, value=SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?
  | name=principalsQuery, value=SELECT PASSWD FROM JBM_USER WHERE USER_ID=?
  | name=unauthenticatedIdentity, value=guest
  | name=dsJndiName, value=java:/SafeOnlineDS
  | 
  | 09:26:56,724 TRACE [DatabaseServerLoginModule] initialize, instance=@15891054
  | 09:26:56,724 TRACE [DatabaseServerLoginModule] Security domain: messaging
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] Saw unauthenticatedIdentity=guest
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] DatabaseServerLoginModule, dsJndiName=java:/SafeOnlineDS
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] principalsQuery=SELECT PASSWD FROM JBM_USER WHERE USER_ID=?
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] rolesQuery=SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] suspendResume=true
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] login
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] Authenticating as unauthenticatedIdentity=guest
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] User 'guest' authenticated, loginOk=true
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] commit, loginOk=true
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] getRoleSets using rolesQuery: SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?, username: guest
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] suspendAnyTransaction
  | 09:26:56,725 TRACE [DatabaseServerLoginModule] Excuting query: SELECT ROLE_ID, 'Roles' FROM JBM_ROLE WHERE USER_ID=?, with username: guest
  | 09:26:56,726 TRACE [DatabaseServerLoginModule] Assign user to role guest
  | 09:26:56,726 TRACE [DatabaseServerLoginModule] resumeAnyTransaction
  | 09:26:56,726 TRACE [messaging] defaultLogin, lc=javax.security.auth.login.LoginContext at 4626db, subject=Subject(27332006).principals=org.jboss.security.SimplePri
  | 09:26:56,726 TRACE [messaging] updateCache, inputSubject=Subject(27332006).principals=org.jboss.security.SimplePrincipal at 5519585(guest)org.jboss.security.Simple
  | 09:26:56,726 TRACE [messaging] Inserted cache info: org.jboss.security.plugins.JaasSecurityManager$DomainInfo at 1bd4f6[Subject(8854389).principals=org.jboss.secur
  | 09:26:56,726 TRACE [messaging] End isValid, true
  | 09:26:56,729 DEBUG [IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 450000
  | 09:26:56,736 WARN  [JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
  | 
  | javax.resource.spi.SecurityException: No Password credentials found
  |     at org.jboss.resource.adapter.jms.JmsCred.getJmsCred(JmsCred.java:75)
  |     at org.jboss.resource.adapter.jms.JmsManagedConnectionFactory.createManagedConnection(JmsManagedConnectionFactory.java:101)
  |     at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:577)
  |     at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:262)
  |     at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:500)
  |     at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:341)
  |     at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:315)
  |     at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:396)
  |     at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
  |     at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.allocateConnection(JmsSessionFactoryImpl.java:389)
  |     at org.jboss.resource.adapter.jms.JmsSessionFactoryImpl.createSession(JmsSessionFactoryImpl.java:369)
  |     at net.link.safeonline.audit.bean.AuditContextFinalizerBean.finalizeAuditContext(AuditContextFinalizerBean.java:60)
  | 

The relevant code used to create the session:

  |     @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
  |     public void finalizeAuditContext(Long auditContextId) {
  |         LOG.debug("finalizing audit context: " + auditContextId);
  |         AuditMessage auditMessage = new AuditMessage(auditContextId);
  |         try {
  |             Connection connection = this.factory.createConnection();
  |             try {
  |                 Session session = connection.createSession(true, 0);        <--- LINE 60
  |                 try {
  |                     MessageProducer producer = session
  |                             .createProducer(this.auditBackendQueue);
  |                     try {
  |                         Message message = auditMessage.getJMSMessage(session);
  |                         producer.send(message);
  |                     } finally {
  |                         producer.close();
  |                     }
  |                 } finally {
  |                     session.close();
  |                 }
  |             } finally {
  |                 connection.close();
  |             }
  |         } catch (JMSException e) {
  |             this.auditAuditDAO.addAuditAudit("unable to publish audit context "
  |                     + auditContextId + " - reason: " + e.getMessage()
  |                     + " - errorCode: " + e.getErrorCode());
  |         }
  |     }
  | 

Some of my configuration files:
http://www.lhunath.lyndir.com/stuff/mysql-persistence-service.xml
http://www.lhunath.lyndir.com/stuff/jms-ds.xml
http://www.lhunath.lyndir.com/stuff/login-config.xml
http://www.lhunath.lyndir.com/stuff/messaging-service.xml


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

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



More information about the jboss-user mailing list