Hi All, I managed to resolve the issue with osgi http service inside Geronimo, as I did some config changes in org.eclipse.equinox.http bundle. Now the osgi http service is available for other bundles and the carbon initialization went forward up to axis2-module deployment.
But now I'm facing issues with dynamic class loading in axis2 bundle requiring carbon.core classes to load as below [1]. Seems like dynamic class loading mechanism in Geronimo is different, hence these issues are popping-up with dynamic imports. I'm looking into this further, will clarify with geronimo folks also. Thanks, Dileepa [1] [2012-09-03 11:20:48,595] INFO {org.apache.axis2.transport.tcp.TCPTransportSender} - TCP Sender started [2012-09-03 11:20:49,023] FATAL {org.wso2.carbon.core.init.CarbonServerManager} - WSO2 Carbon initialization Failed java.lang.NoClassDefFoundError: org/wso2/carbon/core/AbstractAdmin at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at org.apache.geronimo.hook.equinox.GeronimoClassLoader.defineClass(GeronimoClassLoader.java:213) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:567) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:490) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:478) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:458) at org.apache.geronimo.hook.equinox.GeronimoClassLoader.findLocalClass(GeronimoClassLoader.java:237) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.apache.geronimo.hook.equinox.GeronimoClassLoader.loadClass(GeronimoClassLoader.java:85) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at org.apache.axis2.util.Loader.loadClass(Loader.java:261) at org.apache.axis2.util.Loader.loadClass(Loader.java:229) at org.apache.axis2.util.Utils.getServiceClass(Utils.java:799) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:430) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:397) at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:101) at org.wso2.carbon.utils.deployment.Axis2ServiceRegistry.addServices(Axis2ServiceRegistry.java:217) at org.wso2.carbon.utils.deployment.Axis2ServiceRegistry.register(Axis2ServiceRegistry.java:102) at org.wso2.carbon.utils.deployment.Axis2ServiceRegistry.register(Axis2ServiceRegistry.java:89) at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:471) at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:288) at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) On Thu, Aug 30, 2012 at 11:26 AM, Dileepa Jayakody <dile...@wso2.com> wrote: > Hi All, > > With regard to my queries on d...@geronimo.apache.org; > regarding > 1. deploying our set of bundles in Geronimo and consuming osgi http service > 2. deploying carbon as a web-app, starting a separate osgi runtime for our > plugins and proxying http-requests to the osgi http-service > > Below is the response I received from dev@geronimo by David Jencks > > qoute; > "I think the basic problem is that geronimo supports wabs and does not > AFAIK support http service. > > I strongly recommend NOT trying to start another osgi framework inside > geronimo. > > If you can repackage your web stuff as one or more wabs, that will be the > easiest to get working. Otherwise you should try to deploy an httpservice > implementation in geronimo. I'm not familiar with the possiblitlies: I > think there's one at ops4j, but it may include jetty which is apt to > conflict with tomcat. Ideally there's be something like a wab that > provides http service, but I don't know if anyone has written such a > bundle." > > On Tue, Aug 28, 2012 at 3:38 PM, Dileepa Jayakody <dile...@wso2.com>wrote: > >> Hi All, >> >> After having problems with osgi httpservice in carbon bundle deployment >> in Geronimo, I tried out the secondary option of running carbon in Geronimo >> in web-app mode. >> >> However when deploying carbon web app I came across the below JNDI issue >> [2]; >> Caused by: javax.naming.NoInitialContextException: Unable to determine >> caller's BundleContext >> at >> org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49) >> >> I think this is related to the bug in aries.jndi 0.3.0 reported here [1]. >> Geronimo 3 uses aries v0.3.0 bundles. I will further look into this and get >> this resolved. >> >> Thanks, >> Dileepa >> >> [1] https://issues.apache.org/jira/browse/ARIES-554 >> >> [2] >> Loading crbn [2012-08-28 >> 10:57:41,739] ERROR {org.wso2.carbon.ndatasource.core.DataSourceRepository} >> - Error in registering data source: WSO2_CARBON_DB - Error in creating >> JNDI subcontext 'javax.naming.InitialContext@20828fe4/jdbc: Unable to >> determine caller's BundleContext >> org.wso2.carbon.ndatasource.common.DataSourceException: Error in creating >> JNDI subcontext 'javax.naming.InitialContext@20828fe4/jdbc: Unable to >> determine caller's BundleContext >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:243) >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.registerJNDI(DataSourceRepository.java:268) >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.registerDataSource(DataSourceRepository.java:389) >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.addDataSource(DataSourceRepository.java:485) >> at >> org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSource(DataSourceManager.java:158) >> at >> org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSources(DataSourceManager.java:130) >> at >> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.initSystemDataSources(DataSourceServiceComponent.java:168) >> at >> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.setSecretCallbackHandlerService(DataSourceServiceComponent.java:154) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:367) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:430) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bind(ServiceComponentProp.java:218) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:344) >> at >> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588) >> at >> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196) >> at >> org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328) >> at >> org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221) >> at >> org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104) >> at >> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) >> 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:819) >> at >> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) >> at >> org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) >> at >> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214) >> at >> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433) >> at >> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451) >> at >> org.wso2.carbon.securevault.internal.SecretManagerInitializerComponent.activate(SecretManagerInitializerComponent.java:48) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346) >> at >> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588) >> at >> org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196) >> at >> org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:441) >> at >> org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:213) >> at >> org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:800) >> at >> org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:767) >> 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) >> Caused by: javax.naming.NoInitialContextException: Unable to determine >> caller's BundleContext >> at >> org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49) >> at >> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) >> at >> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) >> at >> javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:316) >> at >> javax.naming.InitialContext.createSubcontext(InitialContext.java:464) >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.checkAndCreateJNDISubContexts(DataSourceRepository.java:241) >> ... 45 more >> >> >> >> On Mon, Aug 27, 2012 at 1:38 PM, Dileepa Jayakody <dile...@wso2.com>wrote: >> >>> Hi All, >>> >>> Currently I'm having a problem getting osgi http service from Geronimo, >>> which is required by carbon bundles to register servlets and resources. >>> When going through the list of registered osgi services, there's no >>> org.osgi.service.http.HttpService available in Geronimo. >>> Therefore I installed the org.eclipse.equinox.http.servlet and started >>> the bundle, but still it seems the bundle cannot register the httpService. >>> I've also asked help from geronimo dev list on this matter. >>> >>> Thanks, >>> Dileepa >>> >>> On Sun, Aug 26, 2012 at 8:20 PM, Pradeep Fernando <prad...@wso2.com>wrote: >>> >>>> nice progress.!!! lets have a look tomorrow. >>>> >>>> we dont have to configure a new HTTP transports. Geronimo should >>>> expose httpService via one of its bundles. We should be able to use >>>> that. >>>> >>>> >>>> --Pradeep >>>> >>> >>> >>> >>> -- >>> Dileepa Jayakody, >>> Software Engineer, WSO2 Inc. >>> Lean . Enterprise . Middleware >>> >>> Mobile : +94777-857616 >>> >>> >> >> >> -- >> Dileepa Jayakody, >> Software Engineer, WSO2 Inc. >> Lean . Enterprise . Middleware >> >> Mobile : +94777-857616 >> >> > > > -- > Dileepa Jayakody, > Software Engineer, WSO2 Inc. > Lean . Enterprise . Middleware > > Mobile : +94777-857616 > > -- Dileepa Jayakody, Software Engineer, WSO2 Inc. Lean . Enterprise . Middleware Mobile : +94777-857616
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev