1 Reply Latest reply on Jun 18, 2013 2:57 AM by Claus Ibsen

    Camel-Cxf Payload Mode - DefaultSEI not found

    Lalit Manchanda Newbie

      Hi Experts,

       

       

      I am writing a PAYLOAD mode client and for the same I have defined following blueprint:

       

       

       

       

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"

                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                             xmlns:camel="http://camel.apache.org/schema/blueprint"

                 xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"

                 xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"

                 xmlns:cxf="http://cxf.apache.org/blueprint/core"

                 xmlns:camel-cxf="http://camel.apache.org/schema/blueprint/cxf"

                 xsi:schemaLocation="

                   http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd

                   http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd

                                     http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd

                   http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd

                   http://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/cxf/camel-cxf-2.10.0-blueprint.xsd

                   ">

       

       

        <bean id="helloBean" class="manchanda.lalit.cxfclient.HelloBean">

            <property name="say" value="Hi from Camel"/>

        </bean>

       

       

       

       

      <bean id="cxfClient" class="manchanda.lalit.cxfclient.TestCxfClient"/>

       

       

      <camel-cxf:cxfEndpoint xmlns:hy="http://bd.prws.ksrtc.com" id="ksrtc"

                                                                   address="http://111.93.131.108:9080/AWATAR_WSRouter/services/ResvAdaptee"

                                                                   serviceName="hy:ResvAdapteeService">

       

      </camel-cxf:cxfEndpoint>

       

       

       

       

       

        <camelContext trace="false" id="blueprintContext" xmlns="http://camel.apache.org/schema/blueprint">

          <route id="timerToLog">

              <from uri="timer:foo?period=50000"/>

                <bean ref="cxfClient" method="dispatchByCamel"/>

              <log message="The message contains ${body}"/>

              <to uri="mock:result"/>

          </route>

       

          <route id="ksrtc-request">

              <from uri="direct:ksrtc"/>

              <to uri="cxf:bean:ksrtc?portName=hy:ResvAdaptee&amp;dataFormat=PAYLOAD&amp;allowStreaming=true"/>

          </route>

          

      </camelContext>

       

       

      </blueprint>

       

       

       

       

       

       

       

       

      But my application does not start and gives the following exception:

       

       

       

       

       

       

       

       

      12:27:13,273 | ERROR | t-0.1.0-thread-1 | BlueprintCamelContext            | 138 - org.apache.camel.camel-blueprint - 2.10.0.redhat-60024 | Error occurred during starting Camel: CamelContext(blueprintContext) due Failed to create Producer for endpoint: Endpoint[cxf://bean:ksrtc?allowStreaming=true&dataFormat=PAYLOAD&portName=hy%3AResvAdaptee]. Reason: java.lang.ClassNotFoundException: org.apache.camel.component.cxf.DefaultSEI not found by manchanda.lalit.TryCxfClient [595]^M

      org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[cxf://bean:ksrtc?allowStreaming=true&dataFormat=PAYLOAD&portName=hy%3AResvAdaptee]. Reason: java.lang.ClassNotFoundException: org.apache.camel.component.cxf.DefaultSEI not found by manchanda.lalit.TryCxfClient [595]^M

              at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:395)^M

              at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:114)^M

              at org.apache.camel.impl.ProducerCache.startProducer(ProducerCache.java:145)^M

              at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:175)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.processor.interceptor.TraceInterceptor.doStart(TraceInterceptor.java:358)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.processor.WrapProcessor.doStart(WrapProcessor.java:52)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1064)^M

              at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:41)^M

              at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:28)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.processor.UnitOfWorkProcessor.doStart(UnitOfWorkProcessor.java:88)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:52)^M

              at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:73)^M

              at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.impl.RouteService.startChildService(RouteService.java:322)^M

              at org.apache.camel.impl.RouteService.warmUp(RouteService.java:151)^M

              at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2000)^M

              at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:1928)^M

              at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1716)^M

              at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1597)^M

              at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1453)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1421)^M

              at org.apache.camel.blueprint.BlueprintCamelContext.maybeStart(BlueprintCamelContext.java:161)^M

              at org.apache.camel.blueprint.BlueprintCamelContext.serviceChanged(BlueprintCamelContext.java:128)^M

              at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:934)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:795)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4596)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.Felix.registerService(Felix.java:3604)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346)^M

              at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:352)^M

              at org.apache.camel.blueprint.BlueprintCamelContext.init(BlueprintCamelContext.java:87)^M

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_43]^M

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_43]^M

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_43]^M

              at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_43]^M

              at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:297)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:958)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BeanRecipe.runBeanProcInit(BeanRecipe.java:712)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:824)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_43]^M

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_43]^M

              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintRepository.createAll(BlueprintRepository.java:183)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintContainerImpl.instantiateEagerComponents(BlueprintContainerImpl.java:667)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:370)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:261)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:270)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:233)[14:org.apache.aries.blueprint.core:1.0.1.redhat-60024]^M

              at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)[13:org.apache.aries.util:1.0.1.redhat-60024]^M

              at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)[13:org.apache.aries.util:1.0.1.redhat-60024]^M

              at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)[13:org.apache.aries.util:1.0.1.redhat-60024]^M

              at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)[13:org.apache.aries.util:1.0.1.redhat-60024]^M

              at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)[13:org.apache.aries.util:1.0.1.redhat-60024]^M

              at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:696)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:484)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4580)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.Felix$4.run(Felix.java:2115)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.Felix$5.run(Felix.java:2159)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[:1.6.0_43]^M

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_43]^M

              at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_43]^M

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)[:1.6.0_43]^M

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)[:1.6.0_43]^M

              at java.lang.Thread.run(Thread.java:662)[:1.6.0_43]^M

      Caused by: java.lang.ClassNotFoundException: org.apache.camel.component.cxf.DefaultSEI not found by manchanda.lalit.TryCxfClient [595]^M

              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)^M

              at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)^M

              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)^M

              at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_43]^M

              at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1862)[org.apache.felix.framework-4.0.3.redhat-60024.jar:]^M

              at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)^M

              at org.apache.camel.component.cxf.CxfBlueprintEndpoint.setServiceClass(CxfBlueprintEndpoint.java:50)^M

              at org.apache.camel.component.cxf.CxfEndpoint.createClient(CxfEndpoint.java:499)^M

              at org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:76)^M

              at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:60)^M

              at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:62)^M

              at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:393)^M

       

       

       

       

       

       

      Following is the pom.xml I am using

       

       

       

       

      <?xml version="1.0" encoding="UTF-8"?>

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

       

       

        <modelVersion>4.0.0</modelVersion>

       

       

        <groupId>manchanda.lalit</groupId>

        <artifactId>TryCxfClient</artifactId>

        <packaging>jar</packaging>

        <version>0.1</version>

       

       

        <name>A Camel Blueprint Route</name>

        <url>http://www.myorganization.org</url>

       

       

        <properties>

          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

          <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        </properties>

       

       

        <dependencies>

          <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-core</artifactId>

            <version>2.10.0.redhat-60024</version>

            <scope>provided</scope>

          </dependency>

          <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-blueprint</artifactId>

            <version>2.10.0.redhat-60024</version>

            <scope>provided</scope>

          </dependency>

       

       

      <!-- CXF -->

       

       

                <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-cxf</artifactId>

            <version>2.10.0.redhat-60024</version>

            <scope>provided</scope>

          </dependency>

         

          <dependency>

                <groupId>com.sun.xml.bind</groupId>

                <artifactId>jaxb-impl</artifactId>

                <version>2.1.13</version>

      </dependency>

       

       

      <dependency>

                <groupId>javax.xml</groupId>

                <artifactId>jaxb-api</artifactId>

                <version>2.1</version>

      </dependency>

                 

       

       

      <dependency>

                <groupId>org.codehaus.woodstox</groupId>

                <artifactId>woodstox-core-asl</artifactId>

                <version>4.2.0</version>

      </dependency>

                 

                 

       

       

          <!-- logging -->

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-api</artifactId>

            <version>1.7.5</version>

          </dependency>

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-log4j12</artifactId>

            <version>1.7.5</version>

          </dependency>

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>jcl-over-slf4j</artifactId>

            <version>1.7.5</version>

          </dependency>

          <dependency>

            <groupId>log4j</groupId>

            <artifactId>log4j</artifactId>

            <version>1.2.17</version>

          </dependency>

       

       

          <!-- testing -->

          <dependency>

            <groupId>org.apache.camel</groupId>

            <artifactId>camel-test-blueprint</artifactId>

            <version>2.11.0</version>

            <scope>test</scope>

          </dependency>

        </dependencies>

       

       

        <build>

          <defaultGoal>install</defaultGoal>

       

       

          <plugins>

            <plugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-compiler-plugin</artifactId>

              <version>2.5.1</version>

              <configuration>

                <source>1.6</source>

                <target>1.6</target>

              </configuration>

            </plugin>

            <plugin>

              <groupId>org.apache.maven.plugins</groupId>

              <artifactId>maven-resources-plugin</artifactId>

              <version>2.6</version>

              <configuration>

                <encoding>UTF-8</encoding>

              </configuration>

            </plugin>

       

       

           

          </plugins>

        </build>

       

       

      </project>

       

       

       

       

       

       

       

       

      Please help me know what can I do differently?

       

       

      Regds

      Lalit