10 Replies Latest reply on Mar 9, 2010 7:53 PM by njiang

    ESB 4.2.0 - No component found with scheme: cxf error

    concombremasqué

      Hi,

       

      In spite of the release note and the ESB-1099 that should be fixed, I can reproduce the "No component found with scheme: cxf" error.

       

      My environment: JDK 1.6 Update 18

       

      I am using FUSE ESB 4.2.0 with following features: featuresBoot=activemq,activemq-broker,camel,camel-osgi,camel-cxf,camel-jms,web,cxf,cxf-osgi,transaction

       

      1- Start a fresh new ESB instance.

      2- install "jpa-hibernate" feature

      3- try to install a bundle making use of the Camel CXF component (in a route: "cxf:bean:...")

       

      Then I got the following exception:

       

      ****************************************

      org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[cxf:bean:integrationSystem_ApplicationEndpoint?d... because of Failed to resolve endpoint: cxf://bean:integrationSystem_ApplicationEndpoint?dataFormat=POJO due to: No component found with scheme: cxf

           at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)

           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)

           at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)

           at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)

           at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)

           at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)

           at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)

           at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)

           at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)

           at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)

           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)

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

      Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[cxf:bean:integrationSystem_ApplicationEndpoint?d... because of Failed to resolve endpoint: cxf://bean:integrationSystem_ApplicationEndpoint?dataFormat=POJO due to: No component found with scheme: cxf

           at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:145)

           at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:610)

           at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1180)

           at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1090)

           at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1020)

           at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:158)

           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)

           at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:898)

           at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)

           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)

           ... 12 more

      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://bean:integrationSystem_ApplicationEndpoint?dataFormat=POJO due to: No component found with scheme: cxf

           at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:453)

           at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:46)

           at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:158)

           at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)

           at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:119)

           at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)

           at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88)

           at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:680)

           at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:140)

           ... 21 more

       

      ***************************************

       

      Two important things to consider:

       

      1) if I don't install "jpa-hibernate" feature then the bundle is correctly installed and the Camel route available.

      2) if I use the original featuresBoot list it also works: it seems one or several features may have some sort of influence

       

      Regards,

      CM

       

      Update 03/08: in fact it seems hibernate feature has nothing to do with the issue. I also got the same exception by installing a bundle that uses camel-cxf (just stop/restart servicemix several times and I always got the exception).

       

      Edited by: concombre masqué on Mar 8, 2010 9:48 AM

        • 1. Re: ESB 4.2.0 - No component found with scheme: cxf error
          njiang

          Maybe there are some bundle conflicts which stop the camel-cxf bundle installation.

           

          Can you check if there is a common-pools bundle dependency in the jpa-hibernate?

          We fixed an issue which is related to this bundle recently.

           

          There is a workaround by using same with common-pools across the Fuse ESB.

          • 2. Re: ESB 4.2.0 - No component found with scheme: cxf error
            concombremasqué

            Yes the "jpa-hibernate" feature installs Apache Commons DBCP which depends on Commons Pool. But I can see that the "activemq" feature also installs Commons Pool.

             

            The problem arises only when adding "jpa-hibernate".

             

            I have a look at the issue you refer to (CAMEL-2514). So if I understand, the manifest for Commons Pool 1.5.4 isn't correct?

            • 3. Re: ESB 4.2.0 - No component found with scheme: cxf error
              concombremasqué

              Ok I am going crazy...

               

              I've tried identifying what feature(s) could be responsible for this exception but the only "stable" configuration is observed using the default featuresBoot property value (i.e. out of the box 'org.apache.felix.karaf.features.cfg' file).

               

              If I try to restrict the number of features to the ones I need it may works on the first ESB run but if I shutdown the bus and restart it then it fails with error "No component found with scheme: cxf".

              I've never seen such a behaviour with any previous FUSE ESB release.

               

              Key point is: all these strange things happen right after installing feature 'jpa-hibernate'.

               

               

              Ah and I am running on Windows.

               

              CM

              • 4. Re: ESB 4.2.0 - No component found with scheme: cxf error
                njiang

                Can I have a look at your jpa-hibernate feature?

                Which version of commons pool does dependent on?

                BTW, in Fuse ESB 4.2.0, the activemq feature should use Commons Pool bundle 1.5.4.

                • 5. Re: ESB 4.2.0 - No component found with scheme: cxf error
                  njiang

                  Can you create a JIRA and submit a small test case for it ?

                  It will help us to identify the key of the issue.

                  • 6. Re: ESB 4.2.0 - No component found with scheme: cxf error
                    concombremasqué

                    Well I don't understand your question: it is not "my" jpa-hibernate feature. I only install the out of the box jpa-hibernate feature that comes with FUSE ESB 4.2.0.

                     

                    So I should expect you are aware of the dependencies.

                     

                    Anyway to answer your question: yes this version 1.5.4 of Commons Pool bundle that is used.

                     

                    Regards,

                    CM

                    • 7. Re: ESB 4.2.0 - No component found with scheme: cxf error
                      concombremasqué

                      Hi,

                       

                      It appears I can't submit a JIRA on FUSE ESB (don't kown why). So here is the steps to reproduce the issue:

                       

                      1- modify the features configuration file to set featuresBoot value to:

                      featuresBoot=activemq,activemq-broker,camel,camel-osgi,camel-cxf,camel-jms,web,cxf,cxf-osgi,transaction

                       

                      2- start servicemix

                       

                      3- deploy a bundle that makes use of camel-cxf (the route has a cxf:bean:). Here I sometimes got the exception:

                       

                      org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[cxf:bean:integrationSystem_ApplicationMgmtEndpoi... because of Failed to resolve endpoint: cxf://bean:integrationSystem_ApplicationMgmtEndpoint?dataFormat=POJO due to: No component found with scheme: cxf

                           at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1055)

                           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:103)

                           at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:593)

                           at org.springframework.context.event.SimpleApplicationEventMulticaster$1.run(SimpleApplicationEventMulticaster.java:78)

                           at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)

                           at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:76)

                           at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:274)

                           at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:736)

                           at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)

                           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)

                           at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)

                           at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)

                           at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)

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

                      Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route[[From[cxf:bean:integrationSystem_ApplicationMgmtEndpoi... because of Failed to resolve endpoint: cxf://bean:integrationSystem_ApplicationMgmtEndpoint?dataFormat=POJO due to: No component found with scheme: cxf

                           at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:145)

                           at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:610)

                           at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1180)

                           at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1090)

                           at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1020)

                           at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:158)

                           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:53)

                           at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:898)

                           at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:197)

                           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)

                           ... 12 more

                      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: cxf://bean:integrationSystem_ApplicationMgmtEndpoint?dataFormat=POJO due to: No component found with scheme: cxf

                           at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:453)

                           at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:46)

                           at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:158)

                           at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113)

                           at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:119)

                           at org.apache.camel.model.FromDefinition.resolveEndpoint(FromDefinition.java:72)

                           at org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:88)

                           at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:680)

                           at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:140)

                           ... 21 more

                       

                       

                      If you don't get exception at step 3 then go on with following steps:

                       

                      4- shutdown servicemix (osgi:shutdown)

                       

                      5- start servicemix again. During startup I could then see previous exception (refer to step 3)

                       

                       

                      This scenario is ok with any previous RC of FUSE ESB 4.1.0-psc-01. But it fails using FUSE ESB 4.2.0.

                       

                      Thanks for looking at this.

                       

                      Regards,

                      CM

                      • 8. Re: ESB 4.2.0 - No component found with scheme: cxf error
                        njiang

                        After went through the instruction that you showed, I found you did some thing wrong on the featuresBoot,

                         

                        featuresBoot=activemq,activemq-broker,camel,camel-osgi,camel-cxf,camel-jms,web,cxf,cxf-osgi,transaction

                         

                        You need to remove the camel-osgi feature, as the camel feature includes what you need for basic camel usage.

                         

                        In Fuse ESB 4.2.0, we merged the camel-spring and camel-osgi bundle to be camel-spring-osgi and updated the camel feature for it. Your camel-osgi feature will introduce the conflicts to the camel-spring-osgi, so please remove it from your featuresBoot section.

                        • 9. Re: ESB 4.2.0 - No component found with scheme: cxf error
                          concombremasqué

                          You are right. Removing the camel-osgi has indeed a deep impact on the whole ESB behaviour. Wow.

                           

                          Everything works as expected now. Thanks you.

                           

                          Now a question: why not remove any conflicting features like 'camel-osgi'? What is the use for such feature for example?

                           

                          The problem is that several bundles export the same packages  (geronimo jaxws/servicemix bundle specs jaxws, camel-osgi/camel-spring-osgi...). What's the point?

                           

                          Thanks again

                          CM

                          • 10. Re: ESB 4.2.0 - No component found with scheme: cxf error
                            njiang

                            We have an issue that installing camel-osgi and camel-spring in different order will cause the "http://camel.apache.org/schema/spring" namespace can't be handled rightly in OSGi environment. So we merged the camel-osgi and camel-spring bundles together, it's camel-spring-osgi.

                             

                            In this way camel-osgi and camel-spring-osgi both have a BundleActivator which will help camel-core to load the component in OSGi container. If you install these two bundle at the same time will cause some conflict on the component finding.

                             

                            For the geronimo jaxws/servicemix bundle specs jaxws issue is caused by the geronimo jaxws bundle can't find the other service provider (such AXIS2 bundle) in the OSGi environment, so we need to use the servicemix one to do it.