On Fri, Dec 14, 2012 at 4:16 PM, Dimuthu Leelarathne <[email protected]>wrote:
> Hi Senaka, > > Username in Carbon Context is null. I am debugging more to find out how > the username in CC got set to null. > We fixed a similar issue recently. Recently Sinthuja did a fix to give priority to the ThreadLocal CC instead of MessageContext. The CC was not getting initialized properly for the login request cz the TomcatValve wasn't initializing the tenant's CC, reason for that is the login request (/carbon/admin/login_action.jsp) doesn't have tenant info .. We fixed this by using current MessageContext to populate the CC for post login operations (fix in LoggedUserInfoAdmin) .. diff is as follows; - UserRealm userRealm = getUserRealm(); + UserRealm userRealm = (UserRealm) PrivilegedCarbonContext. getCurrentContext(messageContext).getUserRealm(); You could try this fix just to verify if the issue ur facing has anything to do with CC hierarchy ... Also I changed the tomcat valve to set the username when it gets hit .. but in the CC class, it doesn't try to fetch the username if its null, it merely does a return expecting upstream code set it .. which is not happening .. > thanks, > dimuthu > > > On Fri, Dec 14, 2012 at 3:49 PM, Senaka Fernando <[email protected]> wrote: > >> Hi Dimuthu, >> >> What's null? Based on that, please check back the stacktrace to see how >> that value is obtained and passed into UM - because IIRC we don't construct >> anything about users and/or permissions within the registry kernel. And, >> from what I understand it seems that the CCtx does not seem to have the >> proper value of something. >> >> Thanks, >> Senaka. >> >> On Fri, Dec 14, 2012 at 2:57 PM, Dimuthu Leelarathne >> <[email protected]>wrote: >> >>> ManageGenericArtifactService >> >> >> >> >> -- >> * <http://wso2con.com/> >> * >> * >> >> Senaka Fernando* >> Member - Integration Technologies Management Committee; >> Technical Lead; WSO2 Inc.; http://wso2.com* >> Member; Apache Software Foundation; http://apache.org >> >> E-mail: senaka AT wso2.com >> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 >> Linked-In: http://linkedin.com/in/senakafernando >> >> *Lean . Enterprise . Middleware >> >> > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Thanks, Shariq. Phone: +94 777 202 225
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
