5 Replies Latest reply on Jan 7, 2012 7:45 PM by Freeman(Yue) Fang

    Failed to resolve endpoint: nmr:// due to No component found with scheme:

    Lekan Omotayo Expert

      I just installed the new 4.2 ESB and I am trying to use the nkmr component but I encountered the ffg error:

       

      11:23:16,399 | ERROR | xtenderThread-70 | ContextLoaderListener            | BundleApplicationContextListener   50 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=kimono-logger-bundle, config=osgibundle:/META-INF/spring/*.xml))

      org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route6: Route[[From[nmr:kimonoLogger]] -> [Choice[[When[xpath{//cr[(... because of Failed to resolve endpoint: nmr://kimonoLogger due to: No component found with scheme: nmr

           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 route6: Route[[From[nmr:kimonoLogger]] -> [Choice[[When[xpath{//cr[(... because of Failed to resolve endpoint: nmr://kimonoLogger due to: No component found with scheme: nmr

           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: nmr://kimonoLogger due to: No component found with scheme: nmr

           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

       

      Kindly help

        • 1. Re: Failed to resolve endpoint: nmr:// due to No component found with scheme:
          Freeman(Yue) Fang Master

          Hi,

           

          You need ensure you already install camel-nmr feature.

           

          Freeman

          • 2. Re: Failed to resolve endpoint: nmr:// due to No component found with scheme:
            Ngoc Hai Pham Newbie

            This still happens to me.

            I do have camel-nmr feature installed, but this happens almost every time I start SMX.

            After SMX started, restarting the bundles will make it work again but this is very annoying as we have to do this after smx started.

             

            My bundle also have this in src/main/resources/META-INF/spring/bundle-context-osgi.xml

             

             

             

             

             

            My system:

             

            Karaf

              Karaf home                  /mnt/data/apps/apache-servicemix-4.2.0-fuse-02-00

              Karaf base                  /mnt/data/apps/apache-servicemix-4.2.0-fuse-02-00

              OSGi Framework              org.eclipse.osgi - 3.5.1.R35x_v20090827

             

            JVM

              Java Virtual Machine        Java HotSpot(TM) Server VM version 20.1-b02

              Vendor                      Sun Microsystems Inc.

              Uptime                      10 minutes

              Total compile time          1 minute

            Threads

              Live threads                196

              Daemon threads              78

              Peak                        207

              Total started               422

            Memory

              Current heap size           323,766 kbytes

              Maximum heap size           932,096 kbytes

              Committed heap size         414,016 kbytes

              Pending objects             0

              Garbage collector           Name = 'PS Scavenge', Collections = 15, Time = 0.589 seconds

              Garbage collector           Name = 'PS MarkSweep', Collections = 1, Time = 0.076 seconds

            Classes

              Current classes loaded      9,839

              Total classes loaded        9,839

              Total classes unloaded      0

            Operating system

              Name                        Linux version 2.6.39-2-686-pae

              Architecture                i386

              Processors                  2

             

             

            Exception:

             

             

             

            Exception in thread "SpringOsgiExtenderThread-36" org.apache.camel.RuntimeCamelException: java.lang.NullPointerException

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

                 at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:693)

                 at org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1211)

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

                 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)

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

            Caused by: java.lang.NullPointerException

                 at org.apache.camel.osgi.OsgiFactoryFinder.getResource(OsgiFactoryFinder.java:83)

                 at org.apache.camel.osgi.OsgiFactoryFinder.findClass(OsgiFactoryFinder.java:51)

                 at org.apache.camel.impl.DefaultFactoryFinder.findClasses(DefaultFactoryFinder.java:113)

                 at org.apache.camel.impl.DefaultFactoryFinder.findClasses(DefaultFactoryFinder.java:108)

                 at org.apache.camel.impl.DefaultFactoryFinder.newInstances(DefaultFactoryFinder.java:62)

                 at org.apache.camel.impl.converter.DefaultTypeConverter.loadFallbackTypeConverters(DefaultTypeConverter.java:376)

                 at org.apache.camel.impl.converter.DefaultTypeConverter.loadTypeConverters(DefaultTypeConverter.java:366)

                 at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:384)

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

                 at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)

                 at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1174)

                 at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:644)

                 at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:691)

                 ... 20 more

            Exception in thread "SpringOsgiExtenderThread-51" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myBeanImpl' defined in URL bundleentry://563.fwk14892568/META-INF/spring/camel-context.xml: Initialization of bean failed; nested exception is org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: nmr://PMDBSelectQuery due to: No component found with scheme: nmr

                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)

                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)

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

                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)

                 at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)

                 at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)

                 at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)

                 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)

                 at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)

                 at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)

                 at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)

                 at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$1600(AbstractDelegatedExecutionApplicationContext.java:69)

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

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

            Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: nmr://PMDBSelectQuery due to: No component found with scheme: nmr

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

                 at org.apache.camel.util.CamelContextHelper.getEndpointInjection(CamelContextHelper.java:133)

                 at org.apache.camel.impl.CamelPostProcessorHelper.getEndpointInjection(CamelPostProcessorHelper.java:127)

                 at org.apache.camel.impl.CamelPostProcessorHelper.createInjectionProducerTemplate(CamelPostProcessorHelper.java:169)

                 at org.apache.camel.impl.CamelPostProcessorHelper.getInjectionValue(CamelPostProcessorHelper.java:136)

                 at org.apache.camel.spring.CamelBeanPostProcessor.injectField(CamelBeanPostProcessor.java:215)

                 at org.apache.camel.spring.CamelBeanPostProcessor$2.doWith(CamelBeanPostProcessor.java:203)

                 at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:523)

                 at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:500)

                 at org.apache.camel.spring.CamelBeanPostProcessor.injectFields(CamelBeanPostProcessor.java:199)

                 at org.apache.camel.spring.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:91)

                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:350)

                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1331)

                 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)

                 ... 16 more

            Exception in thread "SpringOsgiExtenderThread-53" org.apache.camel.RuntimeCamelException: java.lang.NullPointerException

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

                 at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:693)

                 at org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1211)

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

                 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)

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

            Caused by: java.lang.NullPointerException

                 at org.apache.camel.osgi.OsgiFactoryFinder.getResource(OsgiFactoryFinder.java:83)

                 at org.apache.camel.osgi.OsgiFactoryFinder.findClass(OsgiFactoryFinder.java:51)

                 at org.apache.camel.impl.DefaultFactoryFinder.findClasses(DefaultFactoryFinder.java:113)

                 at org.apache.camel.impl.DefaultFactoryFinder.findClasses(DefaultFactoryFinder.java:108)

                 at org.apache.camel.impl.DefaultFactoryFinder.newInstances(DefaultFactoryFinder.java:62)

                 at org.apache.camel.impl.converter.DefaultTypeConverter.loadFallbackTypeConverters(DefaultTypeConverter.java:376)

                 at org.apache.camel.impl.converter.DefaultTypeConverter.loadTypeConverters(DefaultTypeConverter.java:366)

                 at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:384)

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

                 at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:49)

                 at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1174)

                 at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:644)

                 at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:691)

                 ... 20 more

             

             

            SMX camel:

            features:list | grep camel

            camel                                repo-0

            camel-core                           repo-0

            camel-spring-osgi                    repo-0

            camel-spring                         repo-0

            camel-osgi                           repo-0

            camel-test                           repo-0

            camel-cxf                            repo-0

            camel-cache                          repo-0

            camel-castor                         repo-0

            camel-dozer                          repo-0

            camel-http                           repo-0

            camel-mina                           repo-0

            camel-jetty                          repo-0

            camel-servlet                        repo-0

            camel-jms                            repo-0

            camel-amqp                           repo-0

            camel-atom                           repo-0

            camel-bam                            repo-0

            camel-bindy                          repo-0

            camel-cometd                         repo-0

            camel-csv                            repo-0

            camel-flatpack                       repo-0

            camel-freemarker                     repo-0

            camel-ftp                            repo-0

            camel-guice                          repo-0

            camel-groovy                         repo-0

            camel-hl7                            repo-0

            camel-ibatis                         repo-0

            camel-irc                            repo-0

            camel-jaxb                           repo-0

            camel-jcr                            repo-0

            camel-jing                           repo-0

            camel-jdbc                           repo-0

            camel-josql                          repo-0

            camel-jpa                            repo-0

            camel-jxpath                         repo-0

            camel-juel                           repo-0

            camel-ldap                           repo-0

            camel-mail                           repo-0

            camel-msv                            repo-0

            camel-mvel                           repo-0

            camel-ognl                           repo-0

            camel-printer                        repo-0

            camel-protobuf                       repo-0

            camel-quartz                         repo-0

            camel-restlet                        repo-0

            camel-rmi                            repo-0

            camel-rss                            repo-0

            camel-saxon                          repo-0

            camel-scala                          repo-0

            camel-script                         repo-0

            camel-smpp                           repo-0

            camel-snmp                           repo-0

            camel-spring-integration             repo-0

            camel-sql                            repo-0

            camel-stream                         repo-0

            camel-string-template                repo-0

            camel-tagsoup                        repo-0

            camel-velocity                       repo-0

            camel-xmlbeans                       repo-0

            camel-xmlsecurity                    repo-0

            camel-xmpp                           repo-0

            camel-xstream                        repo-0

            camel-nmr                            repo-0

            camel-activemq                       repo-0

            examples-camel-osgi                  repo-0

            examples-camel-nmr                   repo-0

            examples-cxf-camel-nmr               repo-0

            servicemix-camel                     repo-0

             

            Edited by: ngochai on Jan 5, 2012 7:44 AM

            • 3. Re: Failed to resolve endpoint: nmr:// due to No component found with scheme:
              Freeman(Yue) Fang Master

              Hi,

               

              You use a quite old FUSE ESB version.

              In recent version, we specify lower start-level for camel component bundles, which ensure the fundamental bundles can get started early, this can avoid such exception.

               

              Freeman

              • 4. Re: Failed to resolve endpoint: nmr:// due to No component found with scheme:
                Ngoc Hai Pham Newbie

                Hi ffang,

                Thanks for the reply, is there any workaround for SMX 4.2 then?

                • 5. Re: Failed to resolve endpoint: nmr:// due to No component found with scheme:
                  Freeman(Yue) Fang Master

                  Hi,

                   

                  4.2 is too old and I don't think we can specify start-level for bundles in that version.

                  Any chance you upgrade the FUSE ESB version?

                   

                  Freeman