5 Replies Latest reply on Jan 19, 2016 1:45 PM by Sundar Munirathnam Rajendran

    no declaration can be found for element 'camelContext'.

    Satish Sharma Newbie

      Hi

      I am using camel to build some sample routes. and deploying the build to apache-karaf-4.0.3.

      Camel Version  2.15.1

       

      i get exception for

      The matching wildcard is strict, but no declaration can be found for element 'camelContext'.


      I have my xml schema definitions as follows

      ----------------------------------------------------------------

      <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"@@

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

        xsi:schemaLocation="

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

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

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

       

      i tried the solution provided here Where is camelContext? XSD but dont know where i am missing something

      (camel-context and pom files are attached)

       

       

      i am getting below error while trying to install the bundle

      ----------------------------------------------------------------------------------

      Line 17 in XML document from URL [bundle://218.0:0/META-INF/spring/camel-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex

      -type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'.

      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 17 in XML document from URL [bundle://218.0:0/META-INF/spring/camel-context.xml] is

      invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

      'camelContext'.

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)

              at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)

              at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:164)

              at org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext.loadBeanDefinitions(OsgiBundleXmlApplicationContext.java:136)

              at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)

              at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:530)

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

      )

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$3.run(AbstractDelegatedExecutionApplicationContext.java:269)

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

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.startRefresh(AbstractDelegatedExecutionApplicationContext.java:

      247)

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.stageOne(DependencyWaiterApplicationContex

      tExecutor.java:214)

              at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor.refresh(DependencyWaiterApplicationContext

      Executor.java:169)

              at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.refresh(AbstractDelegatedExecutionApplicationContext.java:175)

              at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$2.run(ContextLoaderListener.java:716)

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

      Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'camelContext'.

              at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

              at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)

              at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)

              at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)

              at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)

              at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

              at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)

              at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)

              at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)

              ... 18 more