11 Replies Latest reply on Nov 10, 2010 7:43 PM by pchandler

    Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap

    sanre6

      Hi,

          i am trying to deploy a bundle containing camel-route's between Pojo's in *apache-servicemix-4.3.0-fuse-00-00* .all my camel jar's are of *2.4.0-fuse-00-00* version.i have built the bundle using maven bundle plugin and m2eclipse

       

      my camel-client.xml is

       

      **

       

      </beans>

       

       

       

       

      i get a weird namespace error,below is the error trace

       

       

      org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL bundle://33.0:0/META-INF/spring/camel-client.xml; nested exception is org.springframework.beans.FatalBeanException: Class for namespace http://camel.apache.org/schema/spring does not implement the [org.springframework.beans.f

      actory.xml.NamespaceHandler] interface

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:176)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:142)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[60:org.springframework.context:3.0.3.RELEASE]

              at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)[60:org.springframework.context:3.0.3.RELEASE]

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.access$800(AbstractDelegatedExecutionApplicationContext.java:69)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:247)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContextExecutor.java:222)[72:org.springframework.osgi.extender:1.2.0]

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContextExecutor.java:175)[72:org.springframework.osgi.extender:1.2.0]

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:718)[72:org.springframework.osgi.extender:1.2.0]

              at java.lang.Thread.run(Thread.java:619)[:1.6.0_12]

      Caused by: org.springframework.beans.FatalBeanException: Class for namespace http://camel.apache.org/schema/spring does not implement the interface

              at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:126)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.osgi.context.support.DelegatedNamespaceHandlerResolver.resolve(DelegatedNamespaceHandlerResolver.java:56)[71:org.springframework.osgi.core:1.2.0]

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1330)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1325)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)[59:org.springframework.beans:3.0.3.RELEASE]

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)[59:org.springframework.beans:3.0.3.RELEASE]

              ... 18 more

       

       

       

      what could be the reason for this for namespace handling error

       

      thanks

      sanre6@gmail.com

       

      Edited by: sanre6 on Oct 29, 2010 10:23 AM

        • 1. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
          davsclaus

          Can you try changing spring-beans-3.0.xsd to either -2.5.xsd or just spring-beans.xsd to see if it helps.

          • 2. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
            smschauhan

            That didn't help much, though changing it to

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

            ><beans xmlns="http://www.springframework.org/schema/beans"

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

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

                  xsi:schemaLocation="

                  http://www.springframework.org/schema/beans >http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

                  http://camel.apache.org/schema/spring >http://camel.apache.org/schema/spring/camel-spring.xsd>

            >">

            In order to use this schema, I had to manually copy the spring.handlers and spring.schemas files from camel-spring/META-INF to myproject/src/main/resources/META-INF.

            • 3. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
              davsclaus

              Try check the etc/config.properties files to ensure its set to equinox as OSGi framework

               

              It should be like this

              karaf.framework=equinox

              • 4. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                smschauhan

                I am using apache-servicemix-4.3.0-fuse-00-00. This has the

                 

                >karaf.framework=felix

                 

                Can I change this configuration to equinox, without any major changes or should I try a different version of fuse servicemix altogether?

                 

                Thanks for your reply. I have been stuck quite a while on this

                • 5. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                  njiang

                  yes, you just need to change that part as Claus said.

                  Because felix and equinox provide the stander service of OSGi, you don't need to do other configuration change.

                  • 6. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                    njiang

                    Can I have a look at the camel* bundle that you installed ?

                    • 7. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                      smschauhan

                      Sure. Here is what I have.

                      >karaf@root> features:list|grep camel

                      >[installed  ] camel                                repo-0

                      >[installed  ] camel-core                           repo-0

                      >[installed  ] camel-spring                         repo-0

                      >[uninstalled] camel-blueprint                      repo-0

                      >[uninstalled] camel-test                           repo-0

                      >[uninstalled] camel-cxf                            repo-0

                      >[uninstalled] camel-cache                          repo-0

                      >[uninstalled] camel-castor                         repo-0

                      >[uninstalled] camel-crypto                         repo-0

                      >[uninstalled] camel-http                           repo-0

                      >[uninstalled] camel-http4                          repo-0

                      >[uninstalled] camel-mina                           repo-0

                      >[uninstalled] camel-jetty                          repo-0

                      >[uninstalled] camel-servlet                        repo-0

                      >[installed  ] camel-jms                            repo-0

                      >[uninstalled] camel-amqp                           repo-0

                      >[uninstalled] camel-atom                           repo-0

                      >[uninstalled] camel-bam                            repo-0

                      >[uninstalled] camel-bindy                          repo-0

                      >[uninstalled] camel-cometd                         repo-0

                      >[uninstalled] camel-csv                            repo-0

                      >[uninstalled] camel-dozer                          repo-0

                      >[uninstalled] camel-flatpack                       repo-0

                      >[uninstalled] camel-freemarker                     repo-0

                      >[uninstalled] camel-ftp                            repo-0

                      >[uninstalled] camel-guice                          repo-0

                      >[uninstalled] camel-groovy                         repo-0

                      >[uninstalled] camel-hl7                            repo-0

                      >[uninstalled] camel-hawtdb                         repo-0

                      >[uninstalled] camel-ibatis                         repo-0

                      >[uninstalled] camel-irc                            repo-0

                      >[installed  ] camel-jackson                        repo-0

                      >[uninstalled] camel-jaxb                           repo-0

                      >[uninstalled] camel-jcr                            repo-0

                      >[uninstalled] camel-jing                           repo-0

                      >[uninstalled] camel-jdbc                           repo-0

                      >[uninstalled] camel-josql                          repo-0

                      >[uninstalled] camel-jpa                            repo-0

                      >[uninstalled] camel-jxpath                         repo-0

                      >[uninstalled] camel-juel                           repo-0

                      >[uninstalled] camel-ldap                           repo-0

                      >[uninstalled] camel-lucene                         repo-0

                      >[uninstalled] camel-mail                           repo-0

                      >[uninstalled] camel-msv                            repo-0

                      >[uninstalled] camel-mvel                           repo-0

                      >[uninstalled] camel-nagios                         repo-0

                      >[uninstalled] camel-netty                          repo-0

                      >[uninstalled] camel-ognl                           repo-0

                      >[uninstalled] camel-printer                        repo-0

                      >[uninstalled] camel-protobuf                       repo-0

                      >[uninstalled] camel-quartz                         repo-0

                      >[uninstalled] camel-restlet                        repo-0

                      >[uninstalled] camel-rmi                            repo-0

                      >[uninstalled] camel-rss                            repo-0

                      >[uninstalled] camel-saxon                          repo-0

                      >[uninstalled] camel-scala                          repo-0

                      >[uninstalled] camel-script                         repo-0

                      >[uninstalled] camel-smpp                           repo-0

                      >[uninstalled] camel-snmp                           repo-0

                      >[uninstalled] camel-soap                           repo-0

                      >[uninstalled] camel-spring-integration             repo-0

                      >[uninstalled] camel-spring-javaconfig              repo-0

                      >[uninstalled] camel-spring-security                repo-0

                      >[uninstalled] camel-sql                            repo-0

                      >[installed  ] camel-stream                         repo-0

                      >[uninstalled] camel-string-template                repo-0

                      >[uninstalled] camel-tagsoup                        repo-0

                      >[uninstalled] camel-velocity                       repo-0

                      >[uninstalled] camel-xmlbeans                       repo-0

                      >[uninstalled] camel-xmlsecurity                    repo-0

                      >[uninstalled] camel-xmpp                           repo-0

                      >[uninstalled] camel-xstream                        repo-0

                      >[uninstalled] camel-bean-validator                 repo-0

                      >[uninstalled] camel-nmr                            repo-0

                      >[installed  ] camel-activemq                       repo-0

                      >[uninstalled] examples-camel-osgi                  repo-0

                      >[uninstalled] examples-camel-nmr                   repo-0

                      >[uninstalled] examples-cxf-camel-nmr               repo-0

                      >[installed  ] servicemix-camel                     repo-0

                       

                      Edited by: smschauhan on Nov 3, 2010 5:47 AM

                      • 8. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                        davsclaus

                        Can you do a:

                        osgi:list | grep camel

                        • 9. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                          smschauhan

                          I just moved to apache-servicemix-4.3.0-fuse-02-00. Installed the same bundles as previous one. Here is what it looks like:

                           

                          >karaf@root> list|grep camel

                          >[  69] camel-core (2.4.0.fuse-01-00)

                          >[  76] camel-spring (2.4.0.fuse-01-00)

                          >[ 180] camel-jms (2.4.0.fuse-01-00)

                          >[ 183] camel-jackson (2.4.0.fuse-01-00)

                          >[ 184] activemq-camel (5.4.1.fuse-00-00)

                          >[ 185] camel-stream (2.4.0.fuse-01-00)

                          • 10. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                            njiang

                            All the camel bundle look good.

                            It may relate to the Spring packages that your application bundle imports.

                             

                            Please make sure you just install one version of Spring.

                            • 11. Re: Camel-route Deploying error: CamelNamespaceHandler] for namespace [camel.ap
                              pchandler