Announcement Announcement Module
No announcement yet.
spring data schema location Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring data schema location


    I'm new to Spring Data and trying to integrate hadoop with Spring. With the following applicationContext.xml, I got an genericOptionType error when parsing the xml file during server start up.

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

    <contextroperty-placeholder location=""/>


    <hdp:hbase-configuration configuration-ref="hadoopConfiguration"/>

    <bean id="hTemplate" class=" Template" p:configuration-ref="hbaseConfiguration"/>

    <context:component-scan base-package=" base"/>


    SEVERE: Exception sending context initialized event to listener instance of class StartupListener
    org.springframework.beans.factory.xml.XmlBeanDefin itionStoreException: Line 250 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cos-ct-extends. Error for type 'genericOptionsType'. The content type of a derived type and that of its base must both be mixed or element-only.
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR
    at BeanDefinitionReader.loadBeanDefinitions(AbstractB
    at BeanDefinitionReader.loadBeanDefinitions(AbstractB
    at BeanDefinitionReader.loadBeanDefinitions(AbstractB
    at icationContext.loadBeanDefinitions(XmlWebApplicati
    at icationContext.loadBeanDefinitions(XmlWebApplicati
    at hableApplicationContext.refreshBeanFactory(Abstrac
    at ationContext.obtainFreshBeanFactory(AbstractApplic
    at ationContext.refresh(AbstractApplicationContext.ja va:397)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized( 47)
    at StartupListener.contextInitialized(IndigoStartupLi
    at org.apache.catalina.core.StandardContext.listenerS tart(
    at org.apache.catalina.core.StandardContext.startInte rnal(
    at org.apache.catalina.util.LifecycleBase.start(Lifec
    at org.apache.catalina.core.ContainerBase.addChildInt ernal(
    at org.apache.catalina.core.ContainerBase.addChild(Co
    at org.apache.catalina.core.StandardHost.addChild(Sta
    at org.apache.catalina.startup.HostConfig.deployWAR(H
    at org.apache.catalina.startup.HostConfig$DeployWar.r un(
    at java.util.concurrent.Executors$ l(
    at java.util.concurrent.FutureTask$Sync.innerRun(Futu

    This seems related to the schema (spring-hadoop.xsd). Spring Data documentation mentioned that although the schema location indicates external file, but it will resolve the schema locally since it is available in the spring hadoop jar. Does that mean the spring-hadoop.xsd will be picked up from the local jar file instead of using the external one?



  • #2

    The XSD is embedded in the jar and it should be resolved locally - the schema is also available at the public registered URL but that's typically a fallback used for tools that cannot read it locally.
    The error however should not occur as it looks like the parser or the schema is invalid. We have nightly builds against the namespace so the latter is incorrect which leads me to believe there's something wrong with the former.

    What version of the JDK/Tomcat/SHDP are you using?


    P.S. Can you please wrap the stacktrace/xml with code tags next time to increase readability? Thanks.


    • #3
      I've done some minor adjustments to the XSD which should fix your problem so please do try out the latest snapshot ( The validator in Eclipse and on-line pass just fine - let me know if this is or not the case for you.