Fixed and added a test case also. The issue arises from ST mode. For tenants, this is working fine. The issue is in CarbonTomcatRealm where for ST, the tenant domain is not getting set (set to NULL). It should be set to carbon.super. Using the tenant domain it gets the tenant ID and then it gets the roles defined for that tenant.
Interestingly, the issue was there earlier also. In there, for tenant domain NULL, we were returning the the tenant ID as 0. That is why it was passing. Thanks, Kishanthan. On Sat, Jun 23, 2012 at 12:25 PM, Kishanthan Thangarajah < [email protected]> wrote: > > > On Fri, Jun 22, 2012 at 2:10 AM, Afkham Azeez <[email protected]> wrote: > >> Check the example webapp >> >> HTTP Status 500 - >> ------------------------------ >> >> *type* Exception report >> >> *message*** >> >> *description* *The server encountered an internal error () that >> prevented it from fulfilling this request.* >> >> *exception* >> >> java.lang.NullPointerException >> >> org.wso2.carbon.tomcat.ext.realms.CarbonTomcatRealm$GenericCarbonPrincipal.hasRole(CarbonTomcatRealm.java:227) >> org.apache.catalina.realm.RealmBase.hasRole(RealmBase.java:965) >> >> org.apache.catalina.realm.RealmBase.hasResourcePermission(RealmBase.java:885) >> >> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:562) >> >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) >> >> org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:143) >> >> org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) >> >> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) >> >> org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:48) >> >> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) >> >> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999) >> >> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565) >> >> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1620) >> >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) >> >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) >> java.lang.Thread.run(Thread.java:680) >> >> >> Please write a test case for this scenario when you fix it. >> >> I will look into this. > > Kishanthan. > >> >> -- >> *Afkham Azeez* >> Director of Architecture; WSO2, Inc.; http://wso2.com >> Member; Apache Software Foundation; http://www.apache.org/ >> * <http://www.apache.org/>** >> email: **[email protected]* <[email protected]>* cell: +94 77 3320919 >> blog: **http://blog.afkham.org* <http://blog.afkham.org>* >> twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> >> * >> linked-in: **http://lk.linkedin.com/in/afkhamazeez* >> * >> * >> *Lean . Enterprise . Middleware* >> >> > > > -- > *Kishanthan Thangarajah* > Software Engineer, > Development Technologies Team, > WSO2, Inc. > lean.enterprise.middleware > > Mobile - +94773426635 > Blog - *http://kishanthan.wordpress.com* > Twitter - *http://twitter.com/kishanthan* > > -- *Kishanthan Thangarajah* Software Engineer, Development Technologies Team, WSO2, Inc. lean.enterprise.middleware Mobile - +94773426635 Blog - *http://kishanthan.wordpress.com* Twitter - *http://twitter.com/kishanthan*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
