Hi All

I am getting NullPointerException when executing the following line in a
web-app running on wso2as-6.0.0-SNAPSHOT server.

        Map<String, ConfigurationContext> tenantConfigContexts =
               (Map<String, ConfigurationContext>)
TenantAxisUtils.getTenantConfigurationContexts( (ConfigurationContext)

*PrivilegedCarbonContext.getThreadLocalCarbonContext().getOSGiService(TenantMgtServiceComponent.class,null));*

Exception:

java.lang.NullPointerException
        
org.wso2.carbon.context.CarbonContext.createFilter(CarbonContext.java:418)*     
org.wso2.carbon.context.PrivilegedCarbonContext.getOSGiService(PrivilegedCarbonContext.java:362)*
        org.wso2.qqa.tenant.TenantInfoService.getItem(TenantInfoService.java:31)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:597)
        
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
        
com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
        
com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
        
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        
com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
        
com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
        
com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
        
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
        
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
        
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
        
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
        
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
        
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:727)

I also added the carboncontext-osgi-services.properties  as following

*osgi.service.1 = org.wso2.carbon.tenant.mgt.internal.TenantMgtServiceComponent*

Appreciate your thoughts on what could have made this gone wrong?



Thanks and Best Regards,

Saneth Dharmakeerthi
Senior Software Engineer
WSO2, Inc.
Mobile: +94772325511
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to