Follow instructions in Steps to Reproduce.
Basically, there are multiple versions of com.google-guava in Karaf. There is 20.0.0-redhat-1 in Karaf. However, org.apache.servicemix.bundles.reflections-Apache ServiceMix :: Bundles :: reflections bundle needs guava version 19.0. Maybe, we just need to increase the range from [18.0,19) -> [18:]
Apache ServiceMix :: Bundles :: reflections (165) ------------------------------------------------- Bnd-LastModified = 1493842467401 Build-Jdk = 1.8.0_111 Built-By = jbonofre Created-By = Apache Maven Bundle Plugin Manifest-Version = 1.0 Tool = Bnd-3.2.0.201605172007 Bundle-Description = This OSGi bundle wraps reflections 0.9.11 jar file. Bundle-DocURL = http://www.apache.org/ Bundle-License = http://www.apache.org/licenses/LICENSE-2.0.txt Bundle-ManifestVersion = 2 Bundle-Name = Apache ServiceMix :: Bundles :: reflections Bundle-SymbolicName = org.apache.servicemix.bundles.reflections Bundle-Vendor = The Apache Software Foundation Bundle-Version = 0.9.11.1 Require-Capability = osgi.ee;filter:=(&(osgi.ee=JavaSE)(version=1.7)) Export-Package = org.reflections; uses:="com.google.common.base, com.google.common.collect, javax.annotation, org.reflections.adapters, org.reflections.scanners, org.reflections.serializers, org.slf4j"; version=0.9.11, org.reflections.adapters;uses:="javassist.bytecode,javax.annotation,org.reflections.vfs";version=0.9.11, org.reflections.scanners; uses:="com.google.common.base, com.google.common.collect, javax.annotation, org.reflections, org.reflections.adapters, org.reflections.vfs"; version=0.9.11, org.reflections.serializers;uses:=org.reflections;version=0.9.11, org.reflections.util; uses:="com.google.common.base, javax.annotation, javax.servlet, org.reflections, org.reflections.adapters, org.reflections.scanners, org.reflections.serializers, org.slf4j"; version=0.9.11, org.reflections.vfs;uses:=com.google.common.base;version=0.9.11 Import-Package = org.osgi.framework;version="[1.6,2)", *com.google.common.base;resolution:=optional;version="[18.0,19)",* com.google.common.collect;resolution:=optional;version="[18.0,19)", com.google.common.io;resolution:=optional;version="[18.0,19)", com.google.gson;resolution:=optional, javassist;resolution:=optional;version="[3.21,4)", javassist.expr;resolution:=optional;version="[3.21,4)", javassist.bytecode;resolution:=optional;version="[3.21,4)", javassist.bytecode.annotation;resolution:=optional;version="[3.21,4)", javax.annotation;resolution:=optional, javax.servlet;resolution:=optional, org.dom4j;resolution:=optional, org.dom4j.io;resolution:=optional, org.reflections;resolution:=optional;version="[0.9,1)", org.reflections.adapters;resolution:=optional;version="[0.9,1)", org.reflections.scanners;resolution:=optional;version="[0.9,1)", org.reflections.serializers;resolution:=optional;version="[0.9,1)", org.reflections.util;resolution:=optional;version="[0.9,1)", org.reflections.vfs;resolution:=optional;version="[0.9,1)", org.slf4j;resolution:=optional, com.google.common.cache;resolution:=optional;version="[18.0,19)", org.apache.commons.vfs2;resolution:=optional, com.sun.jdi;resolution:=optional, com.sun.jdi.connect;resolution:=optional, com.sun.jdi.event;resolution:=optional, com.sun.jdi.request;resolution:=optional, com.sun.msv.datatype;resolution:=optional, com.sun.msv.datatype.xsd;resolution:=optional, javax.swing.table;resolution:=optional, javax.swing.tree;resolution:=optional, javax.xml.bind;resolution:=optional, javax.xml.namespace;resolution:=optional, javax.xml.stream;resolution:=optional, javax.xml.stream.events;resolution:=optional, javax.xml.stream.util;resolution:=optional, org.gjt.xpp;resolution:=optional, org.jaxen;resolution:=optional, org.jaxen.dom4j;resolution:=optional, org.jaxen.pattern;resolution:=optional, org.jaxen.saxpath;resolution:=optional, org.relaxng.datatype;resolution:=optional, org.xmlpull.v1;resolution:=optional, sun.misc;resolution:=optional
KARAF log
5:42:46.355 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus,instance.id=1822866053: org.apache.cxf.bus.ManagedBus@52878b42 15:42:46.371 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus,instance.id=1822866053: javax.management.modelmbean.RequiredModelMBean@1b28f2cb 15:42:46.374 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registered org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus,instance.id=1822866053 15:42:46.377 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager,instance.id=1450849847: org.apache.cxf.bus.managers.WorkQueueManagerImplMBeanWrapper@790ae8c3 15:42:46.379 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager,instance.id=1450849847: javax.management.modelmbean.RequiredModelMBean@614ff681 15:42:46.553 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] Setting the server's publish address to be /swaggerSample 15:42:46.555 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus.Service.Endpoint,service="{http://deployment.swagger.rs.cxf.qe.jboss.org/}ContactService",port="ContactService",instance.id=593578787: org.apache.cxf.endpoint.ManagedEndpoint@66b17bb4 15:42:46.562 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] registering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus.Service.Endpoint,service="{http://deployment.swagger.rs.cxf.qe.jboss.org/}ContactService",port="ContactService",instance.id=593578787: javax.management.modelmbean.RequiredModelMBean@1047d308 15:42:46.670 WARN [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null 15:42:46.673 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] unregistering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus,instance.id=1822866053 15:42:46.674 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] unregistering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,type=Bus.Service.Endpoint,service="{http://deployment.swagger.rs.cxf.qe.jboss.org/}ContactService",port="ContactService",instance.id=593578787 15:42:46.675 INFO [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] unregistering MBean org.apache.cxf:bus.id=org.jboss.qe.cxf.rs.swagger-deployment-cxf1822866053,WorkQueueManager=Bus.WorkQueueManager,type=WorkQueueManager,instance.id=1450849847 15:42:46.677 ERROR [pipe-bundle:install -s mvn:org.jboss.qe.cxf.rs/swagger-deployment/1.0.0-SNAPSHOT] Unable to start blueprint container for bundle org.jboss.qe.cxf.rs.swagger-deployment/1.0.0.SNAPSHOT org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to initialize bean contactService at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:593) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:703) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) ~[48:org.apache.aries.blueprint.core:1.9.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?] at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:360) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:190) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:716) ~[48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:413) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:278) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:299) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:268) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:264) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:254) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422) [48:org.apache.aries.blueprint.core:1.9.0] at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1179) [?:?] at org.apache.felix.framework.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:730) [?:?] at org.apache.felix.framework.EventDispatcher.fireBundleEvent(EventDispatcher.java:485) [?:?] at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4579) [?:?] at org.apache.felix.framework.Felix.startBundle(Felix.java:2174) [?:?] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) [?:?] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984) [?:?] at org.apache.karaf.bundle.command.Install.execute(Install.java:115) [124:org.apache.karaf.bundle.core:4.2.0.fuse-000191-redhat-1] at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:571) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:497) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:386) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:417) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59) [148:org.apache.karaf.shell.core:4.2.0.fuse-000191-redhat-1] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?] at java.lang.Thread.run(Thread.java:748) [?:?] Caused by: java.lang.NoClassDefFoundError: com/google/common/base/Predicate at io.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:257) ~[?:?] at io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:240) ~[?:?] at io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:221) ~[?:?] at org.apache.cxf.jaxrs.swagger.Swagger2Feature.addSwaggerResource(Swagger2Feature.java:195) ~[?:?] at org.apache.cxf.jaxrs.swagger.AbstractSwaggerFeature.initialize(AbstractSwaggerFeature.java:69) ~[?:?] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.applyFeatures(JAXRSServerFactoryBean.java:252) ~[?:?] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:196) ~[?:?] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.init(JAXRSServerFactoryBean.java:142) ~[?:?] 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.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:331) ~[?:?] at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838) ~[?:?] at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:591) ~[?:?] ... 40 more Caused by: java.lang.ClassNotFoundException: com.google.common.base.Predicate not found by org.apache.servicemix.bundles.reflections [165] at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) ~[?:?] at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?] at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:?] at io.swagger.jaxrs.config.BeanConfig.classes(BeanConfig.java:257) ~[?:?] at io.swagger.jaxrs.config.BeanConfig.scanAndRead(BeanConfig.java:240) ~[?:?] at io.swagger.jaxrs.config.BeanConfig.setScan(BeanConfig.java:221) ~[?:?] at org.apache.cxf.jaxrs.swagger.Swagger2Feature.addSwaggerResource(Swagger2Feature.java:195) ~[?:?] at org.apache.cxf.jaxrs.swagger.AbstractSwaggerFeature.initialize(AbstractSwaggerFeature.java:69) ~[?:?] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.applyFeatures(JAXRSServerFactoryBean.java:252) ~[?:?] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:196) ~[?:?] at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.init(JAXRSServerFactoryBean.java:142) ~[?:?] 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.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:331) ~[?:?] at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:838) ~[?:?] at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:591) ~[?:?] ... 40 more
- is duplicated by
-
ENTESB-8590 karaf-cxf-rest doesn't work
- Closed