9 Replies Latest reply on Mar 26, 2013 6:31 AM by Freeman(Yue) Fang

    CamelBlueprintTestSupport - CXF testing

    Milan Milas Newbie

      Hi,

       

      fuse-esb-7.1.0.fuse-047

      FUSE IDE 7.1

      Java 1.7

       

      I am trying to create simple test using CXF and CamelBlueprintTestSupport.

      I got code from archetype for camel-CXF and camel-blueprint:

       

      public class RouteTest extends CamelBlueprintTestSupport {

          @Override

          protected String getBlueprintDescriptor() {

              return "/OSGI-INF/blueprint/blueprint.xml";

          }

          @Test

          public void testRoute() throws Exception {

               assertEquals(1, 1);

          }

      }

       

      -


         

              <log message="The message contains $"/>

               

      -


      I was adding dependencies as it looks like its not same if I run ruote under ESB

      or under test?

       

      -


      I was getting messages that test was not able to load different kind of Dependencies but

      as I kept adding dependencies errors have gone. The last error message I got is:

               Blueprint Extender: 3 BlueprintContainerImpl         INFO  Bundle cxfTest is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0

               Blueprint Extender: 2 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

               Blueprint Extender: 2 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle org.apache.cxf.cxf-rt-transports-http

      org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.IncompatibleClassChangeError: class org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator has interface org.objectweb.asm.ClassVisitor as super class

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:116)

           at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

      -


      All Output:

      -


      T E S T S

      -


      Running com.mycompany.cxfTest.RouteTest

      CamelBlueprintHelper           INFO  Using Blueprint XML file: /C:/Fuse/Projects/FuseCXFPayloadTestPoC/cxfTest/target/classes/OSGI-INF/blueprint/blueprint.xml

      RawBuilder                     INFO  Copy thread finished.

      Activator                      INFO  Camel activator starting

      Activator                      INFO  Camel activator started

      Mar 22, 2013 5:19:22 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

      INFO: Adding the extensions from bundle org.apache.camel.camel-cxf-transport (33)

      Mar 22, 2013 5:19:22 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

      INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-bindings-xml (36)

      Mar 22, 2013 5:19:22 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

      INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (37)

      Mar 22, 2013 5:19:22 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

      INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-frontend-jaxws (38)

      BlueprintExtender              INFO  No quiesce support is available, so blueprint components will not participate in quiesce operations

      RouteTest                      INFO  ********************************************************************************

      RouteTest                      INFO  Testing: testRoute(com.mycompany.cxfTest.RouteTest)

      RouteTest                      INFO  ********************************************************************************

               Blueprint Extender: 1 BlueprintContainerImpl         INFO  Bundle cxfTest is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0, http://camel.apache.org/schema/blueprint/cxf, http://camel.apache.org/schema/blueprint

               Blueprint Extender: 1 BlueprintContainerImpl         INFO  Bundle org.apache.cxf.cxf-rt-transports-http is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0

               Blueprint Extender: 3 BlueprintContainerImpl         INFO  Bundle RouteTest is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0

               Blueprint Extender: 3 BlueprintContainerImpl         INFO  Bundle cxfTest is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0

               Blueprint Extender: 2 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

               Blueprint Extender: 2 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle org.apache.cxf.cxf-rt-transports-http

      org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.IncompatibleClassChangeError: class org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator has interface org.objectweb.asm.ClassVisitor as super class

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:116)

           at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)

           at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)

           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$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

           at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)

           at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)

           at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:499)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:341)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)

           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$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           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:1110)

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

           at java.lang.Thread.run(Thread.java:722)

      Caused by: java.lang.IncompatibleClassChangeError: class org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator has interface org.objectweb.asm.ClassVisitor as super class

           at java.lang.ClassLoader.defineClass1(Native Method)

           at java.lang.ClassLoader.defineClass(ClassLoader.java:791)

           at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

           at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)

           at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

           at java.net.URLClassLoader$1.run(URLClassLoader.java:361)

           at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

           at java.security.AccessController.doPrivileged(Native Method)

           at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:423)

           at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

           at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

           at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)

           at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)

           at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)

           at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:300)

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:100)

           ... 28 more

               Blueprint Extender: 1 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

               Blueprint Extender: 3 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

               Blueprint Extender: 1 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle RouteTest

      org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.IncompatibleClassChangeError: org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:116)

           at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)

           at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)

           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$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

           at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)

           at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)

           at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:499)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:341)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)

           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$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           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:1110)

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

           at java.lang.Thread.run(Thread.java:722)

      Caused by: java.lang.IncompatibleClassChangeError: org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator

           at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)

           at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)

           at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)

           at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:300)

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:100)

           ... 28 more

               Blueprint Extender: 3 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle cxfTest

      org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.IncompatibleClassChangeError: org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:116)

           at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)

           at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)

           at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)

           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$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

           at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)

           at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)

           at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:499)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:341)

           at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)

           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$Sync.innerRun(FutureTask.java:334)

           at java.util.concurrent.FutureTask.run(FutureTask.java:166)

           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:1110)

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

           at java.lang.Thread.run(Thread.java:722)

      Caused by: java.lang.IncompatibleClassChangeError: org/apache/aries/proxy/impl/interfaces/InterfaceProxyGenerator

           at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)

           at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)

           at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)

           at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:300)

           at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:100)

           ... 28 more

      Test bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, Bundle-Version=0.2.1

      ServiceReference: , bundle: org.apache.camel.camel-core , symbolicName: org.apache.camel.camel-core

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

      ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

      ServiceReference: , bundle: org.apache.aries.proxy.impl , symbolicName: org.apache.aries.proxy.impl

      ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxws , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxws

      ServiceReference: , bundle: org.apache.camel.camel-blueprint , symbolicName: org.apache.camel.camel-blueprint

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxrs , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxrs

      ServiceReference: , bundle: de.kalpatec.pojosr.framework , symbolicName: de.kalpatec.pojosr.framework

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-simple , symbolicName: org.apache.cxf.cxf-rt-frontend-simple

      ServiceReference: , bundle: org.apache.felix.configadmin , symbolicName: org.apache.felix.configadmin

      ServiceReference: , bundle: org.apache.aries.proxy.impl , symbolicName: org.apache.aries.proxy.impl

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-simple , symbolicName: org.apache.cxf.cxf-rt-frontend-simple

      ServiceReference: , bundle: org.apache.camel.camel-spring , symbolicName: org.apache.camel.camel-spring

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxrs , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxrs

      ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

      ServiceReference: , bundle: org.apache.camel.camel-spring , symbolicName: org.apache.camel.camel-spring

      ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

      ServiceReference: , bundle: org.apache.camel.camel-core , symbolicName: org.apache.camel.camel-core

      ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

      ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxws , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxws

      ServiceReference: , bundle: org.apache.camel.camel-blueprint , symbolicName: org.apache.camel.camel-blueprint

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

      ServiceReference: , bundle: org.apache.camel.camel-core , symbolicName: org.apache.camel.camel-core

      ServiceReference: , bundle: de.kalpatec.pojosr.framework , symbolicName: de.kalpatec.pojosr.framework

      ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

      ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

      ServiceReference: , bundle: de.kalpatec.pojosr.framework , symbolicName: de.kalpatec.pojosr.framework

      ServiceReference: , bundle: org.apache.felix.configadmin , symbolicName: org.apache.felix.configadmin

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

      ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

      ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

      RouteTest                      INFO  ********************************************************************************

      RouteTest                      INFO  Testing done: testRoute(com.mycompany.cxfTest.RouteTest)

      RouteTest                      INFO  Took: 30.593 seconds (30593 millis)

      RouteTest                      INFO  ********************************************************************************

               Blueprint Extender: 2 BlueprintContainerImpl         INFO  Bundle cxfTest is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0

               Blueprint Extender: 2 BlueprintContainerImpl         INFO  Bundle org.apache.cxf.cxf-rt-transports-http is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0

      Mar 22, 2013 5:19:53 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister

      INFO: Removing the extensions for bundle 33

      Mar 22, 2013 5:19:53 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister

      INFO: Removing the extensions for bundle 36

      Mar 22, 2013 5:19:53 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister

      INFO: Removing the extensions for bundle 38

      Mar 22, 2013 5:19:53 PM org.apache.cxf.bus.osgi.CXFExtensionBundleListener unregister

      INFO: Removing the extensions for bundle 37

      Activator                      INFO  Camel activator stopping

      Activator                      INFO  Camel activator stopped

      CamelBlueprintHelper           INFO  Deleting work directory target/bundles/1363972762510

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 30.742 sec <<< FAILURE!

      testRoute(com.mycompany.cxfTest.RouteTest)  Time elapsed: 30.617 sec  <<< ERROR!

      java.lang.RuntimeException: Gave up waiting for service (objectClass=org.apache.camel.CamelContext)

           at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:203)

           at org.apache.camel.test.blueprint.CamelBlueprintHelper.getOsgiService(CamelBlueprintHelper.java:165)

           at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.createCamelContext(CamelBlueprintTestSupport.java:116)

           at org.apache.camel.test.junit4.CamelTestSupport.doSetUp(CamelTestSupport.java:247)

           at org.apache.camel.test.junit4.CamelTestSupport.setUp(CamelTestSupport.java:217)

           at org.apache.camel.test.blueprint.CamelBlueprintTestSupport.setUp(CamelBlueprintTestSupport.java:50)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

           at java.lang.reflect.Method.invoke(Method.java:601)

           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)

           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)

           at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)

           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)

           at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:47)

           at org.junit.rules.RunRules.evaluate(RunRules.java:18)

           at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)

           at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)

           at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)

           at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)

           at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)

           at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)

           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)

           at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

           at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)

           at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)

           at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

           at java.lang.reflect.Method.invoke(Method.java:601)

           at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

           at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

           at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

           at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)

           at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

       

       

      Results :

       

      Tests in error:

        testRoute(com.mycompany.cxfTest.RouteTest): Gave up waiting for service (objectClass=org.apache.camel.CamelContext)

       

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

       

      Is there a simplest example of CXF testing in Camel-blueprint?

      I got this from SVN and it did help me to add additional xmlns to blueprint as well as dependencies:

      camel-blueprint-cxf-test-2.x-fuse-20130213.053242-2

       

      Regards,

      Milan

        • 1. Re: CamelBlueprintTestSupport - CXF testing
          Freeman(Yue) Fang Master

          Hi,

           

          As aries proxy 1.0.x now need asm 4.x, my gut feeling is that you need add asm 4.x to your pom.xml

           

           

          Freeman

          • 2. Re: CamelBlueprintTestSupport - CXF testing
            Milan Milas Newbie

            Thanx for quick answer.

             

            I have added deendency but I am still geting same error:

             

             

                     Blueprint Extender: 2 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle org.apache.cxf.cxf-rt-transports-http

            org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.IncompatibleClassChangeError: class org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator has interface org.objectweb.asm.ClassVisitor as super class

             

            Why my code works in the ESB and not in FUSE IDE test environment?

            I am running it as Maven Test, is this correct or I need to set something additional?

            -


             

            -


            $/target/generated/src/main/java</sourceRoot>               <wsdlOptions>                 <wsdlOption>                   <wsdl>$/src/main/resources/meta-inf/wsdl/order.wsdl

            -


            Regards,

            Milan

            • 3. Re: CamelBlueprintTestSupport - CXF testing
              Milan Milas Newbie

              This is the code on the GitHub if you need to look at the code:

              https://github.com/milanmilas/FuseCXFTest

              • 4. Re: CamelBlueprintTestSupport - CXF testing
                Freeman(Yue) Fang Master

                Hi,

                 

                I think you also need add asm 4.1 bundle in your test code.

                 

                Freeman

                • 5. Re: CamelBlueprintTestSupport - CXF testing
                  Milan Milas Newbie

                   

                  this need to be at the top of dependencies, if it at the end it will give that previous error?

                  This is the new error I got:

                  -


                  -


                  T E S T S

                  -


                  Running com.mycompany.cxfTest.RouteTest

                  CamelBlueprintHelper           INFO  Using Blueprint XML file: /C:/Fuse/Projects/FuseCXFPayloadTestPoC/cxfTest/target/classes/OSGI-INF/blueprint/blueprint.xml

                  RawBuilder                     INFO  Copy thread finished.

                  Activator                      INFO  Camel activator starting

                  Activator                      INFO  Camel activator started

                  BlueprintExtender              INFO  No quiesce support is available, so blueprint components will not participate in quiesce operations

                           Blueprint Extender: 1 BlueprintContainerImpl         INFO  Bundle cxfTest is waiting for namespace handlers http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0, http://camel.apache.org/schema/blueprint/cxf, http://camel.apache.org/schema/blueprint

                  25-Mar-2013 11:27:21 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

                  INFO: Adding the extensions from bundle org.apache.camel.camel-cxf-transport (35)

                  25-Mar-2013 11:27:21 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

                  INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-bindings-xml (38)

                  25-Mar-2013 11:27:21 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

                  INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-frontend-jaxws (39)

                  25-Mar-2013 11:27:21 org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions

                  INFO: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (47)

                  RouteTest                      INFO  ********************************************************************************

                  RouteTest                      INFO  Testing: testRoute(com.mycompany.cxfTest.RouteTest)

                  RouteTest                      INFO  ********************************************************************************

                           Blueprint Extender: 1 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

                           Blueprint Extender: 1 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle org.apache.cxf.cxf-rt-transports-http

                  org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to instantiate components

                       at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:653)

                       at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:356)

                       at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)

                       at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)

                       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)

                       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                       at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)

                       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)

                       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                       at java.lang.Thread.run(Thread.java:662)

                  Caused by: java.lang.NoClassDefFoundError: javax/servlet/Filter

                       at java.lang.ClassLoader.defineClass1(Native Method)

                       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

                       at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

                       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

                       at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

                       at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

                       at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

                       at java.security.AccessController.doPrivileged(Native Method)

                       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                       at java.lang.ClassLoader.defineClass1(Native Method)

                       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)

                       at java.lang.ClassLoader.defineClass(ClassLoader.java:615)

                       at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)

                       at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)

                       at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

                       at java.net.URLClassLoader$1.run(URLClassLoader.java:197)

                       at java.security.AccessController.doPrivileged(Native Method)

                       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                       at de.kalpatec.pojosr.framework.PojoSRBundle.loadClass(PojoSRBundle.java:431)

                       at org.apache.aries.blueprint.container.BlueprintContainerImpl.loadClass(BlueprintContainerImpl.java:404)

                       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$Sync.innerRun(FutureTask.java:303)

                       at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                       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:280)

                       at org.apache.aries.blueprint.container.ServiceRecipe.internalGetService(ServiceRecipe.java:247)

                       at org.apache.aries.blueprint.container.ServiceRecipe.internalCreate(ServiceRecipe.java:147)

                       at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)

                       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                       at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                       at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

                       at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)

                       at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)

                       at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:649)

                       ... 11 more

                  Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter

                       at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

                       at java.security.AccessController.doPrivileged(Native Method)

                       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

                       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

                       at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

                       ... 62 more

                   

                  Edited by: milanmilas on Mar 25, 2013 11:53 AM

                  • 6. Re: CamelBlueprintTestSupport - CXF testing
                    Milan Milas Newbie

                    This is the last version of test:

                    -


                     

                    -


                    RouteTest                      INFO  ********************************************************************************

                    RouteTest                      INFO  Testing: testRoute(com.mycompany.cxfTest.RouteTest)

                    RouteTest                      INFO  ********************************************************************************

                             Blueprint Extender: 2 ManagementStrategyFactory      INFO  JMX is disabled.

                             Blueprint Extender: 1 ManagementStrategyFactory      INFO  JMX is disabled.

                             Blueprint Extender: 2 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

                             Blueprint Extender: 1 BeanRecipe                     WARN  Object to be destroyed is not an instance of UnwrapperedBeanHolder, type: null

                             Blueprint Extender: 2 BlueprintCamelContext          INFO  Apache Camel 2.10.0.fuse-71-047 (CamelContext: blueprintContext) is shutting down

                             Blueprint Extender: 1 BlueprintCamelContext          INFO  Apache Camel 2.10.0.fuse-71-047 (CamelContext: blueprintContext) is shutting down

                             Blueprint Extender: 1 BlueprintCamelContext          INFO  Apache Camel 2.10.0.fuse-71-047 (CamelContext: blueprintContext) is shutdown in 0.002 seconds. Uptime not started.

                             Blueprint Extender: 2 BlueprintCamelContext          INFO  Apache Camel 2.10.0.fuse-71-047 (CamelContext: blueprintContext) is shutdown in 0.003 seconds. Uptime not started.

                             Blueprint Extender: 1 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle RouteTest

                    org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean cxf

                         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)

                         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)

                         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$Sync.innerRun(FutureTask.java:334)

                         at java.util.concurrent.FutureTask.run(FutureTask.java:166)

                         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

                         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)

                         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)

                         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:649)

                         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:356)

                         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)

                         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$Sync.innerRun(FutureTask.java:334)

                         at java.util.concurrent.FutureTask.run(FutureTask.java:166)

                         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:1110)

                         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                         at java.lang.Thread.run(Thread.java:722)

                    Caused by: java.lang.NoSuchMethodError: org.apache.cxf.common.util.ReflectionUtil.findMethod(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

                         at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getClassForMetaData(BlueprintBeanLocator.java:74)

                         at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getClassForMetaData(BlueprintBeanLocator.java:84)

                         at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getBeansOfType(BlueprintBeanLocator.java:123)

                         at org.apache.cxf.bus.CXFBusImpl.initialize(CXFBusImpl.java:185)

                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                         at java.lang.reflect.Method.invoke(Method.java:601)

                         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)

                         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)

                         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)

                         ... 20 more

                             Blueprint Extender: 2 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle cxfTest

                    org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean cxf

                         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)

                         at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)

                         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$Sync.innerRun(FutureTask.java:334)

                         at java.util.concurrent.FutureTask.run(FutureTask.java:166)

                         at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)

                         at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)

                         at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)

                         at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:649)

                         at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:356)

                         at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:255)

                         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$Sync.innerRun(FutureTask.java:334)

                         at java.util.concurrent.FutureTask.run(FutureTask.java:166)

                         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:1110)

                         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                         at java.lang.Thread.run(Thread.java:722)

                    Caused by: java.lang.NoSuchMethodError: org.apache.cxf.common.util.ReflectionUtil.findMethod(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

                         at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getClassForMetaData(BlueprintBeanLocator.java:74)

                         at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getClassForMetaData(BlueprintBeanLocator.java:84)

                         at org.apache.cxf.bus.blueprint.BlueprintBeanLocator.getBeansOfType(BlueprintBeanLocator.java:123)

                         at org.apache.cxf.bus.CXFBusImpl.initialize(CXFBusImpl.java:185)

                         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                         at java.lang.reflect.Method.invoke(Method.java:601)

                         at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)

                         at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)

                         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)

                         ... 20 more

                    Test bundle headers: Bundle-ManifestVersion=2, Bundle-Name=System Bundle, Bundle-SymbolicName=de.kalpatec.pojosr.framework, Bundle-Vendor=kalpatec, Bundle-Version=0.2.1

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

                    ServiceReference: , bundle: woodstox-core-asl , symbolicName: woodstox-core-asl

                    ServiceReference: , bundle: org.apache.camel.camel-core , symbolicName: org.apache.camel.camel-core

                    ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxws , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxws

                    ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

                    ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

                    ServiceReference: , bundle: org.apache.camel.camel-spring , symbolicName: org.apache.camel.camel-spring

                    ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

                    ServiceReference: , bundle: org.apache.aries.proxy.impl , symbolicName: org.apache.aries.proxy.impl

                    ServiceReference: , bundle: org.apache.cxf.cxf-api , symbolicName: org.apache.cxf.cxf-api

                    ServiceReference: , bundle: org.apache.felix.configadmin , symbolicName: org.apache.felix.configadmin

                    ServiceReference: , bundle: org.apache.cxf.cxf-api , symbolicName: org.apache.cxf.cxf-api

                    ServiceReference: , bundle: de.kalpatec.pojosr.framework , symbolicName: de.kalpatec.pojosr.framework

                    ServiceReference: , bundle: woodstox-core-asl , symbolicName: woodstox-core-asl

                    ServiceReference: , bundle: woodstox-core-asl , symbolicName: woodstox-core-asl

                    ServiceReference: , bundle: org.apache.camel.camel-blueprint , symbolicName: org.apache.camel.camel-blueprint

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-simple , symbolicName: org.apache.cxf.cxf-rt-frontend-simple

                    ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

                    ServiceReference: , bundle: org.apache.felix.configadmin , symbolicName: org.apache.felix.configadmin

                    ServiceReference: , bundle: org.apache.camel.camel-http , symbolicName: org.apache.camel.camel-http

                    ServiceReference: , bundle: org.apache.cxf.cxf-api , symbolicName: org.apache.cxf.cxf-api

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

                    ServiceReference: , bundle: org.apache.camel.camel-spring , symbolicName: org.apache.camel.camel-spring

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: org.apache.aries.proxy.impl , symbolicName: org.apache.aries.proxy.impl

                    ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-bindings-soap , symbolicName: org.apache.cxf.cxf-rt-bindings-soap

                    ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: de.kalpatec.pojosr.framework , symbolicName: de.kalpatec.pojosr.framework

                    ServiceReference: , bundle: org.apache.camel.camel-cxf , symbolicName: org.apache.camel.camel-cxf

                    ServiceReference: , bundle: org.apache.cxf.cxf-api , symbolicName: org.apache.cxf.cxf-api

                    ServiceReference: , bundle: woodstox-core-asl , symbolicName: woodstox-core-asl

                    ServiceReference: , bundle: org.apache.camel.camel-core , symbolicName: org.apache.camel.camel-core

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxrs , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxrs

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: org.apache.camel.camel-http , symbolicName: org.apache.camel.camel-http

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxrs , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxrs

                    ServiceReference: , bundle: de.kalpatec.pojosr.framework , symbolicName: de.kalpatec.pojosr.framework

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: org.apache.aries.blueprint , symbolicName: org.apache.aries.blueprint

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-jaxws , symbolicName: org.apache.cxf.cxf-rt-frontend-jaxws

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-bindings-soap , symbolicName: org.apache.cxf.cxf-rt-bindings-soap

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: org.apache.cxf.cxf-api , symbolicName: org.apache.cxf.cxf-api

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-transports-http , symbolicName: org.apache.cxf.cxf-rt-transports-http

                    ServiceReference: , bundle: org.apache.camel.camel-blueprint , symbolicName: org.apache.camel.camel-blueprint

                    ServiceReference: , bundle: woodstox-core-asl , symbolicName: woodstox-core-asl

                    ServiceReference: , bundle: org.apache.camel.camel-core , symbolicName: org.apache.camel.camel-core

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-frontend-simple , symbolicName: org.apache.cxf.cxf-rt-frontend-simple

                    ServiceReference: , bundle: org.apache.cxf.cxf-rt-core , symbolicName: org.apache.cxf.cxf-rt-core

                    -


                             Blueprint Extender: 2 BlueprintContainerImpl         ERROR Unable to start blueprint container for bundle cxfTest

                    org.osgi.service.blueprint.container.ComponentDefinitionException: Unable to intialize bean cxf

                         at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:714)

                     

                     

                     

                    Caused by: java.lang.NoSuchMethodError: org.apache.cxf.common.util.ReflectionUtil.findMethod(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

                     

                    Edited by: milanmilas on Mar 25, 2013 1:17 PM

                    • 7. Re: CamelBlueprintTestSupport - CXF testing
                      Milan Milas Newbie

                      container =

                       

                      fails on blueprintContainer -> container.getClassForMetaData(cmd);

                      /** {@inheritDoc}*/

                          public  cls = getClassForMetaData(cmd);

                                  if (cls != null && type.isAssignableFrom(cls)) {

                                      list.add(type.cast(container.getComponentInstance(s)));

                                  }

                              }

                               

                             

                               

                      container.getClass() = class org.apache.aries.blueprint.container.BlueprintContainerImpl

                       

                      class BlueprintBeanLocator

                       

                          static Class<?> getClassForMetaData(BlueprintContainer container, ComponentMetadata cmd) {

                              Class<?> cls = null;

                              if (cmd instanceof BeanMetadata) {

                                  BeanMetadata bm = (BeanMetadata)cmd;

                                  if (bm instanceof ExtendedBeanMetadata) {

                                      cls = ((ExtendedBeanMetadata)bm).getRuntimeClass();

                                  }

                                  if (cls == null) {

                                      try {

                                          Method m = ReflectionUtil.findMethod(container.getClass(), "loadClass", String.class);

                      • 8. Re: CamelBlueprintTestSupport - CXF testing
                        Milan Milas Newbie

                        First to thank you for quick answer yesterday, at least i got info that what I was doing

                        was in correct direction

                         

                        This is the working solution after 2 days:

                        (I will try to remove some of the Dependencies and to change scopr to test)

                         

                        -


                           

                        -


                         

                        -


                        I think if address of the Endpoint is absolute (http://) I would need http-jetty dependency

                        as well.

                         

                        Regards,

                        Milan

                        • 9. Re: CamelBlueprintTestSupport - CXF testing
                          Freeman(Yue) Fang Master

                          Hi,

                           

                          Thanks for sharing your solution here.

                           

                          Freeman