[jboss-user] [JBoss Messaging Users] - Re: User: null is NOT authenticated

gbansal80 do-not-reply at jboss.com
Tue Oct 27 06:55:21 EDT 2009


It seems that our code is performing logout action which is clearing Principal from cache because of NullPointerException is thrown (User Null Is Not Authenticated).  The relevant portions of the stack trace are provided below:




2009-10-27 12:04:43,216 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] Begin isValid, principal:null, cache info: null
2009-10-27 12:04:43,216 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] defaultLogin, principal=null
2009-10-27 12:04:43,217 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] Login failure
javax.security.auth.login.LoginException: java.lang.NullPointerException
	at com.avaya.security.authorization.common.AuthorizationUtil.publishMessage(AuthorizationUtil.java:369)
	at com.avaya.security.authorization.client.AuthorizationClient.sendUserLogoutNotification(AuthorizationClient.java:1111)
	at com.avaya.mgmt.console.framework.bean.CommonConsoleIdentity.logoutaction(CommonConsoleIdentity.java:368)



However I still have following questions:

1/ In case the principal=null, why can't guest credentials be used for sending the message. In the "messaging" application policy, it has been already configured that any unauthenticated user will assume "guest" credential ( <module-option name = "unauthenticatedIdentity">guest</module-option>
) . So why in this case "guest" credentials are not used.
2/ Any reasons why this exception starts coming only after the system has been up for more than 2 days.

The complete stack trace is pasted below:

2009-10-27 12:04:43,119 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] doesUserHaveRole(Set), subject: Subject:
	Principal: guest
	Principal: Roles(members:john,guest,j2ee)

2009-10-27 12:04:43,119 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] roles=Roles(members:john,guest,j2ee)
2009-10-27 12:04:43,119 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] hasRole(guest)=true
2009-10-27 12:04:43,119 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] hasRole=true
2009-10-27 12:04:43,216 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] Begin isValid, principal:null, cache info: null
2009-10-27 12:04:43,216 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] defaultLogin, principal=null
2009-10-27 12:04:43,217 TRACE [org.jboss.security.plugins.JaasSecurityManager.messaging] Login failure
javax.security.auth.login.LoginException: java.lang.NullPointerException

	at javax.security.auth.login.LoginContext.invoke(LoginContext.java:872)
	at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
	at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
	at javax.security.auth.login.LoginContext.login(LoginContext.java:580)
	at org.jboss.security.plugins.JaasSecurityManager.defaultLogin(JaasSecurityManager.java:603)
	at org.jboss.security.plugins.JaasSecurityManager.authenticate(JaasSecurityManager.java:537)
	at org.jboss.security.plugins.JaasSecurityManager.isValid(JaasSecurityManager.java:344)
	at org.jboss.jms.server.security.SecurityMetadataStore.authenticate(SecurityMetadataStore.java:188)
	at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegateInternal(ServerConnectionFactoryEndpoint.java:233)
	at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegate(ServerConnectionFactoryEndpoint.java:171)
	at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.org$jboss$jms$server$endpoint$advised$ConnectionFactoryAdvised$createConnectionDelegate$aop(ConnectionFactoryAdvised.java:108)
	at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.createConnectionDelegate(ConnectionFactoryAdvised.java)
	at org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateRequest.serverInvoke(ConnectionFactoryCreateConnectionDelegateRequest.java:91)
	at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)
	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:862)
	at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:101)
	at org.jboss.remoting.Client.invoke(Client.java:1858)
	at org.jboss.remoting.Client.invoke(Client.java:718)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:178)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
	at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:80)
	at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect0.invoke(StateCreationAspect0.java)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
	at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
	at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:134)
	at sun.reflect.GeneratedMethodAccessor880.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:121)
	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeNext(ClientClusteredConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
	at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
	at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
	at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
	at com.avaya.security.authorization.common.AuthorizationUtil.publishMessage(AuthorizationUtil.java:369)
	at com.avaya.security.authorization.client.AuthorizationClient.sendUserLogoutNotification(AuthorizationClient.java:1111)
	at com.avaya.mgmt.console.framework.bean.CommonConsoleIdentity.logoutaction(CommonConsoleIdentity.java:368)
	at sun.reflect.GeneratedMethodAccessor3950.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:328)
	at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:341)
	at org.jboss.el.parser.AstPropertySuffix.invoke(AstPropertySuffix.java:58)
	at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
	at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
	at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
	at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:458)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:763)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:238)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:195)
	at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:138)
	at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.avaya.panther.faces.util.ResourceInjectionFilter.doFilter(ResourceInjectionFilter.java:36)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
	at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
	at com.avaya.security.iam.tomcat.HTTPAuthInterceptor.invoke(HTTPAuthInterceptor.java:1077)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
	at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:420)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)


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

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



More information about the jboss-user mailing list