Hi,
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="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>
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(IndigoStartupLi stener.java:27)
at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInte rnal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(Lifec ycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:897)
at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:873)
at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:958)
at org.apache.catalina.startup.HostConfig$DeployWar.r un(HostConfig.java:1599)
at java.util.concurrent.Executors$RunnableAdapter.cal l(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(Futu reTask.java:303)
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?
Thanks,
YuLing


="http://www.springframework.org/schema/p"
Reply With Quote