[JCA/JBoss] - javax.resource.spi.SecurityException: No Password credential
by lhunath
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@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@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@4626db, subject=Subject(27332006).principals=org.jboss.security.SimplePri
| 09:26:56,726 TRACE [messaging] updateCache, inputSubject=Subject(27332006).principals=org.jboss.security.SimplePrincipal(a)5519585(guest)org.jboss.security.Simple
| 09:26:56,726 TRACE [messaging] Inserted cache info: org.jboss.security.plugins.JaasSecurityManager$DomainInfo(a)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
18 years, 2 months
[JBoss Portal] - How to make a PortletRequestDisptach or sendRedirect after a
by speleomaniac
Hallo,
how can we make a PortletRequestDisptach or sendRedirect from a JSF action.
I have a clear idea how to make it in a pure portlet environment (in process action I can place a request parameter and in doView if the request parameter is there I can use the requestdispatch).
Unfortunately this is not working in JSF environment with portletbridge with 1.0.0.B2. Unless I overwrite the portletbrdige I can't see a way to this or anybody has an suggestion....
My case is this, we are trying to force Portal container to change a layout from a portlet (a JSF portlet with portletbridge would happen during a JSF action) so it would change the layout for the portal and load a new portlet.
We hope to realise this via sendRedirect from the ActionResponse, unfortunately this isn't working with the portletbridge 1.0.0.B2 because we are getting "sendRedirect can't be done after Portlet View Mode is set", I think something is happening out of our control in portlet bridge.
Or anybody has another idea to make this layout change?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143776#4143776
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143776
18 years, 2 months
[EJB 3.0] - Re: Reference-Problems within an ear
by jaikiran
"Hilwi" wrote :
| I created another ejb-jar named OpenJbs_EJB.jar now that only contains the persistence.xml with the jar-files to scan:
|
This need not be an EJB jar. It can be a simple jar file and in the application.xml file you can map it as a java module instead of an ejb module:
| <module>
| <java>OpenJbs_EJB.jar</java>
| </module>
|
"Hilwi" wrote :
| This seems not to be a very clean solution to me because the OpenJbs_EJB.jar is just a dummy. Isn't it possible to put the persistence.xml elsewhere?
As far as i know, this is the only way to have multiple jars containing the entities, all belonging to a single persistence unit. In your case, you had to create the dummy jar because you are planning to use the modules across multiple applications.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4143775#4143775
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4143775
18 years, 2 months