java - Caused by: XmlBeanDefinitionStoreException: Line 3 in XML document [/WEB-INF/spring/data.xml] -


i have spring application doest user registration , allows user enter data using crud in spring mvc. when launch application error stackrace

caused by: org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 3 in xml document servletcontext resource [/web-inf/spring/data.xml] invalid; nested exception org.xml.sax.saxparseexception; linenumber: 3; columnnumber: 110; cvc-elt.1: cannot find declaration of element 'beans'. 

this second line of stacktrace error throws

caused by: org.xml.sax.saxparseexception; linenumber: 3; columnnumber: 110; cvc-elt.1: cannot find declaration of element 'beans'.     atm.sun.org.apache.xerces.internal.util.errorhandlerwrapper.createsaxparseexception(errorhandlerwrapper.java:203) 

this class defined in web-inf folder error located

<?xml  version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans"        xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx">      <!-- Настраивает управление транзакциями с помощью аннотации @transactional -->     <tx:annotation-driven transaction-manager="transactionmanager" />      <!-- Менеджер транзакций -->     <bean id="transactionmanager"         class="org.springframework.orm.hibernate3.hibernatetransactionmanager">         <property name="sessionfactory" ref="sessionfactory" />     </bean>       <bean id="messagesource"         class="org.springframework.context.support.reloadableresourcebundlemessagesource">         <property name="basename" value="classpath:messages" />         <property name="defaultencoding" value="utf-8" />     </bean>      <!-- Настройки бина datasource будем хранить в отдельном файле -->     <bean id="propertyconfigurer"         class="org.springframework.beans.factory.config.propertyplaceholderconfigurer"         p:location="/web-inf/jdbc.properties" />      <!-- Непосредственно бин datasource -->     <bean id="datasource"         class="org.springframework.jdbc.datasource.drivermanagerdatasource"         p:driverclassname="${jdbc.driverclassname}"          p:url="${jdbc.databaseurl}"         p:username="${jdbc.username}"          p:password="${jdbc.password}" />       <bean id="sessionfactory"         class="org.springframework.orm.hibernate3.localsessionfactorybean">         <property name="datasource" ref="datasource" />         <property name="configlocation" value="classpath:hibernate.cfg.xml"/>         <property name="configurationclass" value="org.hibernate.cfg.annotationconfiguration"/>         <property name="hibernateproperties">             <props>                 <prop key="hibernate.show_sql">true</prop>                 <prop key="hibernate.dialect">${jdbc.dialect}</prop>                 <prop key="hibernate.connection.charset">utf-8</prop>                 <prop key="hibernate.hbm2ddl.auto">update</prop>             </props>         </property>     </bean>  </beans> 

assuming fine, please why getting above error when launch application. kindly assist.

you miss xml xsd below

 xsi:schemalocation="          http://www.springframework.org/schema/beans              http://www.springframework.org/schema/beans/spring-beans.xsd        http://www.springframework.org/schema/tx        http://www.springframework.org/schema/tx/spring-tx.xsd "   

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -