[ https://issues.apache.org/jira/browse/DOSGI-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christian Schneider resolved DOSGI-223. --------------------------------------- Resolution: Cannot Reproduce Assignee: Christian Schneider The current CXF code does not depend on blueprint anymore. So this should work now. > Problem Instantiating CXF API > ----------------------------- > > Key: DOSGI-223 > URL: https://issues.apache.org/jira/browse/DOSGI-223 > Project: CXF Distributed OSGi > Issue Type: Bug > Components: DSW > Affects Versions: 1.6.0 > Reporter: Setya > Assignee: Christian Schneider > > Hi all, > When starting CXF DOSGI bundles in Virgo I notice the following exception in > the logs that: > [2015-12-29 13:31:09.326] ERROR Blueprint Extender: 3 > org.apache.aries.blueprint.container.BlueprintContainerImpl Unable to > start blueprint container for bundle org.apa > che.cxf.cxf-api > org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to > instantiate components > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:672) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:370) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > org.apache.aries.blueprint.container.ExecutorServiceWrapper.run(ExecutorServiceWrapper.java:106) > at > org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > Caused by: > org.eclipse.virgo.kernel.osgi.framework.ExtendedNoClassDefFoundError: > org/apache/aries/blueprint/NamespaceHandler in KernelBundleClassLoader: > [bundle=org.apache.cxf.cxf-a > pi_2.7.8] in KernelBundleClassLoader: [bundle=org.apache.cxf.cxf-api_2.7.8] > at > org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:152) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > at > org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:340) > at > org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229) > at > org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1212) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.loadClass(BlueprintContainerImpl.java:419) > at > org.apache.aries.blueprint.container.BlueprintRepository.loadClass(BlueprintRepository.java:410) > at > org.apache.aries.blueprint.container.GenericType.parse(GenericType.java:113) > at > org.apache.aries.blueprint.di.AbstractRecipe.doLoadType(AbstractRecipe.java:168) > at > org.apache.aries.blueprint.di.AbstractRecipe.loadType(AbstractRecipe.java:161) > at > org.apache.aries.blueprint.container.BeanRecipe.loadClass(BeanRecipe.java:249) > at > org.apache.aries.blueprint.container.BeanRecipe.getType(BeanRecipe.java:895) > at > org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:323) > at > org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:806) > at > org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787) > at > org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79) > at java.util.concurrent.FutureTask.run(FutureTask.java:262) > at > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88) > at > org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62) > at > org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:106) > at > org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:282) > at > org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:249) > at > org.apache.aries.blueprint.container.ServiceRecipe.getService(ServiceRecipe.java:351) > at > org.apache.aries.blueprint.container.ServiceRecipe$TriggerServiceFactory.getService(ServiceRecipe.java:504) > at > org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:141) > at java.security.AccessController.doPrivileged(Native Method) > at > org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:139) > at > org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:468) > at > org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:467) > at > org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:594) > at > org.eclipse.virgo.shell.internal.CommandRegistry.serviceRegistered(CommandRegistry.java:82) > at > org.eclipse.virgo.shell.internal.CommandRegistry.access$0(CommandRegistry.java:81) > at > org.eclipse.virgo.shell.internal.CommandRegistry$CommandRegistryServiceListener.serviceChanged(CommandRegistry.java:110) > at > org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) > 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.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:439) > at > org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:190) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:690) > at > org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:369) > ... 12 common frames omitted > Caused by: > org.eclipse.virgo.kernel.osgi.framework.ExtendedNoClassDefFoundError: > org/apache/aries/blueprint/NamespaceHandler in KernelBundleClassLoader: > [bundle=org.apache.cxf.cxf-api_2.7.8] > at > org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.defineClass(KernelBundleClassLoader.java:255) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:632) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:607) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:568) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:492) > at > org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:465) > at > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) > at > org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:464) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) > at > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) > at > org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:146) > ... 57 common frames omitted > Caused by: java.lang.NoClassDefFoundError: > org/apache/aries/blueprint/NamespaceHandler > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:800) > at > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188) > at > org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.defineClass(KernelBundleClassLoader.java:251) > ... 69 common frames omitted > Caused by: > org.eclipse.virgo.kernel.osgi.framework.ExtendedClassNotFoundException: > org.apache.aries.blueprint.NamespaceHandler in KernelBundleClassLoader: > [bundle=org.apache.cxf.cxf-api_2.7.8] > at > org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:150) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > ... 73 common frames omitted > Caused by: java.lang.ClassNotFoundException: > org.apache.aries.blueprint.NamespaceHandler > at > org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) > at > org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) > at > org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) > at > org.eclipse.virgo.kernel.userregion.internal.equinox.KernelBundleClassLoader.loadClass(KernelBundleClassLoader.java:146) > ... 74 common frames omitted > Above error originates from org.apache.cxf.cxf-api bundle and when I inspect > the MANIFEST.MF it contains the following entry in its Import-Package: > org.apache.aries.blueprint;version="[0.3,2)";resolution:=optional > While I have made sure that org.apache.aries.blueprint.core bundle gets > deployed beforehand and containing the following entry in its Export-Package: > org.apache.aries.blueprint;uses:="org.osgi.service.blueprint.reflect,org.apache.aries.blueprint.services,org.osgi.framework,org.w3c.dom";version="1.1.0" > So unless I miss something the Export/Import Package should match each other. > Any help would be greatly appreciated. > Thanks & Regards, > Setya -- This message was sent by Atlassian JIRA (v6.3.4#6332)