Hi Nipuni, Bundle is org.wso2.carbon.tenant.mgt_4.3.0.SNAPSHOT and it is in active state
Thanks and Best Regards, Saneth Dharmakeerthi Senior Software Engineer WSO2, Inc. Mobile: +94772325511 On Tue, Jan 6, 2015 at 10:46 AM, Nipuni Perera <[email protected]> wrote: > Hi Saneth, > > I could see that the bundleContext is set to null and causes a NPE. OSGi > bundle in which your service is in should be in ACTIVE state to get the > service. Can you please verify that the bundle is in ACTIVE state? > > Thanks, > Nipuni > > On Tue, Jan 6, 2015 at 10:20 AM, Aruna Karunarathna <[email protected]> > wrote: > >> Hi Saneth, >> >> Can you try this wso2as-6.0.0-SNAPSHOT server with java security manager >> enabled?. >> >> Regards, >> Aruna >> >> On Mon, Jan 5, 2015 at 6:49 PM, Saneth Dharmakeerthi <[email protected]> >> wrote: >> >>> 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 >>> >>> >> >> >> -- >> >> *Aruna Sujith Karunarathna* | Software Engineer >> WSO2, Inc | lean. enterprise. middleware. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 71 9040362 | Work: +94 112145345 >> Email: [email protected] | Web: www.wso2.com >> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Nipuni Perera > Software Engineer; WSO2 Inc.; http://wso2.com > Email: [email protected] > Git hub profile: https://github.com/nipuni > Mobile: +94 (71) 5626680 > <http://wso2.com> > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
