1 Reply Latest reply on Apr 28, 2011 3:43 PM by Ram Konchada

    SAXParseException with the the element osgi:service

    Ram Konchada Newbie

      I get the following exception with mentioned spring configuration file.

       

      Bundles spring-osgi-io, spring-osgi-core, spring-osgi-extender, spring-osgi-annotation are active in servicemix.

       

      I don't get why I am getting this error.

       

      Thanks in advance.

       

      configuration file

      ============

       

       

      Error

      ===

      19:21:15,696 | ERROR | xtenderThread-18 | ContextLoaderListener            | BundleApplicationContextListener   50 | 76 - org.springframework.osgi.extender - 1.2.0 | Application context refresh failed (OsgiBundleXmlApplicationContext(bundle=xxx.SubscriptionDAO, config=osgibundle:/META-INF/spring/*.xml))

      org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from URL bundleentry://344.fwk5998631/META-INF/spring/subscriptiondao-osgi.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 'osgi:service'.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      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 'osgi:service'.

              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:233)[:]

              at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:169)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:420)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:354)[:]

              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:455)[:]

              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3220)[:]

              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1965)[:]

              at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:743)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:414)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2769)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:662)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:154)[:]

              at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:525)[:]

              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:853)[:]

              at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:782)[:]

              at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:157)[:]

              at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:273)[:]

              at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:322)[:]

              at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[63:org.springframework.beans:3.0.3.RELEASE]

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

              ... 18 more

       

       

      Thanks,

      -Ram

       

      Edited by: ramanujam95 on Apr 28, 2011 3:29 PM

       

      Edited by: ramanujam95 on Apr 28, 2011 3:29 PM