Results 1 to 3 of 3

Thread: getricOptionsType error

  1. #1
    Join Date
    Sep 2012
    Posts
    5

    Default getricOptionsType error

    Hi,

    I'm new to Spring Data and trying to integration hadoop with Spring framework. I followed some examples online and here is the applicationContext.xml:

    <?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:context="http://www.springframework.org/schema/context"
    xmlns:hdp="http://www.springframework.org/schema/hadoop"
    xmlns="http://www.springframework.org/schema/p"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schem...ring-beans.xsd
    http://www.springframework.org/schema/context http://www.springframework.org/schem...ng-context.xsd
    http://www.springframework.org/schema/hadoop http://www.springframework.org/schema/hadoop/spring-hadoop.xsd">


    <contextroperty-placeholder location="hadoop.properties"/>

    <hdp:configuration>
    fs.default.name=${hd.fs}
    </hdp:configuration>

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

    <bean id="hTemplate" class="org.springframework.data.hadoop.hbase.Hbase Template" p:configuration-ref="hbaseConfiguration"/>

    <context:component-scan base-package="org.springframework.data.hadoop.samples.h base"/>

    </beans>

    When I tried to start my tomcat server, which has already integrated with Spring, I got an SAXParser exception when parsing the applicationContext.xml.

    Just wondering if someone hit the same error before? Here I attach the detailed error message.

    Thanks very much,

    -YuLing

    SEVERE: Exception sending context initialized event to listener instance of class com.dell.wnm.platform.core.controllerindigo.Indigo 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.1.4.2.2.2.2.1: 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 nReader.java:396)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334)
    at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:143)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:178)
    at org.springframework.beans.factory.support.Abstract BeanDefinitionReader.loadBeanDefinitions(AbstractB eanDefinitionReader.java:149)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:124)
    at org.springframework.web.context.support.XmlWebAppl icationContext.loadBeanDefinitions(XmlWebApplicati onContext.java:93)
    at org.springframework.context.support.AbstractRefres hableApplicationContext.refreshBeanFactory(Abstrac tRefreshableApplicationContext.java:130)
    at org.springframework.context.support.AbstractApplic ationContext.obtainFreshBeanFactory(AbstractApplic ationContext.java:467)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:397)
    at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:276)
    at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:197)
    at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 47)
    at com.dell.wnm.platform.core.controllerindigo.Indigo StartupListener.contextInitialized

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    1) use code tags
    2) could you indicate what is the line 250?
    3) what is or who is genericOptionsType?
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Sep 2012
    Posts
    5

    Default

    Quote Originally Posted by dr_pompeii View Post
    Hello

    1) use code tags
    2) could you indicate what is the line 250?
    3) what is or who is genericOptionsType?

    Actually, I don't think "line 250" refers to any lines in the applicationContext.xml, and genericOptionsType is what defined in spring-hadoop.xsd. I believe the root cause of the issue is that when parsing spring-hadoop.xsd, the parser does not like the syntax in spring-hadoop.xsd.

    I did some hack and removed everything else except hadoop-configuration in spring-hadoop.xsd. Now the problem disappears. However, I couldn't understand why the parser does not like spring-hadoop.xsd syntax? ...and what should I do for the long term solution, since this schema(xsd file) is provided by Spring-Data-hadoop-1.0.0.M2.jar.

    Thanks,

    YuLing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •