+Thusitha, +Jayanga On Mon, Aug 21, 2017 at 10:48 AM, Abimaran Kugathasan <abima...@wso2.com> wrote:
> Hi, > > We are embedding Message Broker feature into API Manager 3.0 core, now API > Manager will function as both MB server and client to manage its artifacts > such as API, application, subscription, throttling etc between its nodes > and Gateway. andes-client [1] will function as JMS client for embedded MB. > > I'm getting the following exception [3] while starting API Manager. When I > check the OSGi console for available services with 'ls', I don't see any > services from andes-client, but andes-client bundle is active. Please find > the half committed PR [2]. > > I learned that, on top of wrapping a library as OSGI bundle, we have to > expose them as SPI services too. So the issue here is, andes-client library > isn't exposing any SPI service to consume by carbon-jndi. > > Carbon team please confirm. > > [1]: https://github.com/wso2/andes/blob/v3.2.22/modules/ > orbit/andes-client/pom.xml > [2]: https://github.com/wso2/carbon-apimgt/pull/4421 > [3]: > [2017-08-21 09:28:17,041] ERROR {org.wso2.carbon.apimgt.core.util.BrokerUtil} > - Could not create a JMS client connection from the class > javax.naming.NoInitialContextException: > Cannot find the InitialContextFactory org.wso2.andes.jndi. > PropertiesFileInitialContextFactory. > at org.wso2.carbon.jndi.internal.osgi.JNDIContextManagerImpl.lambda$ > getInitialContextInternal$28(JNDIContextManagerImpl.java:118) > at java.util.Optional.orElseThrow(Optional.java:290) > at org.wso2.carbon.jndi.internal.osgi.JNDIContextManagerImpl. > getInitialContextInternal(JNDIContextManagerImpl.java:118) > at org.wso2.carbon.jndi.internal.osgi.JNDIContextManagerImpl. > newInitialContext(JNDIContextManagerImpl.java:68) > at org.wso2.carbon.jndi.internal.osgi.factory. > DefaultContextFactory.lambda$getInitialContext$21( > DefaultContextFactory.java:68) > at org.wso2.carbon.jndi.internal.util.LambdaExceptionUtils. > lambda$rethrowFunction$2(LambdaExceptionUtils.java:120) > at java.util.Optional.map(Optional.java:215) > at org.wso2.carbon.jndi.internal.osgi.factory.DefaultContextFactory. > getInitialContext(DefaultContextFactory.java:68) > at javax.naming.spi.NamingManager.getInitialContext( > NamingManager.java:684) > at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313) > at javax.naming.InitialContext.init(InitialContext.java:244) > at javax.naming.InitialContext.<init>(InitialContext.java:216) > at org.wso2.carbon.apimgt.core.impl.BrokerImpl.<init>(BrokerImpl.java:59) > at org.wso2.carbon.apimgt.core.internal.BundleActivator. > start(BundleActivator.java:70) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke( > NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.eclipse.equinox.internal.ds.model.ServiceComponent. > activate(ServiceComponent.java:235) > at org.eclipse.equinox.internal.ds.model.ServiceComponentProp. > activate(ServiceComponentProp.java:146) > at org.eclipse.equinox.internal.ds.model.ServiceComponentProp. > build(ServiceComponentProp.java:345) > at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent( > InstanceProcess.java:620) > at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents( > InstanceProcess.java:197) > at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) > at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged( > SCRManager.java:222) > at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener. > serviceChanged(FilteredServiceListener.java:109) > at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent( > BundleContextImpl.java:915) > at org.eclipse.osgi.framework.eventmgr.EventManager. > dispatchEvent(EventManager.java:230) > at org.eclipse.osgi.framework.eventmgr.ListenerQueue. > dispatchEventSynchronous(ListenerQueue.java:148) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > publishServiceEventPrivileged(ServiceRegistry.java:862) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > publishServiceEvent(ServiceRegistry.java:801) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl. > register(ServiceRegistrationImpl.java:127) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > registerService(ServiceRegistry.java:225) > at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService( > BundleContextImpl.java:464) > at org.eclipse.equinox.internal.ds.InstanceProcess.registerService( > InstanceProcess.java:536) > at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents( > InstanceProcess.java:213) > at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) > at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged( > SCRManager.java:222) > at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener. > serviceChanged(FilteredServiceListener.java:109) > at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent( > BundleContextImpl.java:915) > at org.eclipse.osgi.framework.eventmgr.EventManager. > dispatchEvent(EventManager.java:230) > at org.eclipse.osgi.framework.eventmgr.ListenerQueue. > dispatchEventSynchronous(ListenerQueue.java:148) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > publishServiceEventPrivileged(ServiceRegistry.java:862) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > publishServiceEvent(ServiceRegistry.java:801) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl. > register(ServiceRegistrationImpl.java:127) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > registerService(ServiceRegistry.java:225) > at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService( > BundleContextImpl.java:464) > at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService( > BundleContextImpl.java:482) > at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService( > BundleContextImpl.java:999) > at org.wso2.carbon.connector.framework.ConnectorManager. > registerServerConnector(ConnectorManager.java:56) > at java.util.ArrayList.forEach(ArrayList.java:1249) > at org.wso2.carbon.connector.framework.ConnectorManager. > registerServerConnectorProvider(ConnectorManager.java:124) > at org.wso2.carbon.connector.framework.server.internal.ServerConnectorSC. > registerServerConnectorProvider(ServerConnectorSC.java:55) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke( > NativeMethodAccessorImpl.java:62) > at sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.eclipse.equinox.internal.ds.model.ComponentReference. > bind(ComponentReference.java:376) > at org.eclipse.equinox.internal.ds.model.ServiceComponentProp. > bindReference(ServiceComponentProp.java:444) > at org.eclipse.equinox.internal.ds.model.ServiceComponentProp. > bind(ServiceComponentProp.java:218) > at org.eclipse.equinox.internal.ds.model.ServiceComponentProp. > build(ServiceComponentProp.java:343) > at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent( > InstanceProcess.java:620) > at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents( > InstanceProcess.java:197) > at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) > at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged( > SCRManager.java:222) > at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener. > serviceChanged(FilteredServiceListener.java:109) > at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent( > BundleContextImpl.java:915) > at org.eclipse.osgi.framework.eventmgr.EventManager. > dispatchEvent(EventManager.java:230) > at org.eclipse.osgi.framework.eventmgr.ListenerQueue. > dispatchEventSynchronous(ListenerQueue.java:148) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > publishServiceEventPrivileged(ServiceRegistry.java:862) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > publishServiceEvent(ServiceRegistry.java:801) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl. > register(ServiceRegistrationImpl.java:127) > at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry. > registerService(ServiceRegistry.java:225) > at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService( > BundleContextImpl.java:464) > at org.eclipse.equinox.internal.ds.InstanceProcess.registerService( > InstanceProcess.java:536) > at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents( > InstanceProcess.java:213) > at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver. > java:473) > at org.eclipse.equinox.internal.ds.Resolver.enableComponents( > Resolver.java:217) > at org.eclipse.equinox.internal.ds.SCRManager.performWork( > SCRManager.java:816) > at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob. > dispatch(SCRManager.java:783) > at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89) > at org.eclipse.equinox.internal.util.impl.tpt.threadpool. > Executor.run(Executor.java:70) > > [2017-08-21 09:28:17,121] INFO > {org.wso2.andes.configuration.AndesConfigurationManager} > - Main andes configuration located at : /home/abimaran/sources/wso2/ > git/abimaran/product-apim/product/target/wso2apim-3.0.0- > SNAPSHOT/conf/broker.xml > > > -- > Thanks > Abimaran Kugathasan > Senior Software Engineer - API Technologies > > Email : abima...@wso2.com > Mobile : +94 773922820 <+94%2077%20392%202820> > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > -- Thanks Abimaran Kugathasan Senior Software Engineer - API Technologies Email : abima...@wso2.com Mobile : +94 773922820 <http://stackoverflow.com/users/515034> <http://lk.linkedin.com/in/abimaran> <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> <https://twitter.com/abimaran>
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev