title: XMLBeanDefinitionStoreException: Cannot find the declaration of element 'beans'
body: <p>I am trying the following code: <a href="http://www.dineshonjava.com/2012/12/spring-mvc-with-hibernate-crud-example.html#.Uus0bvnoSGc" rel="noreferrer">http://www.dineshonjava.com/2012/12/spring-mvc-with-hibernate-crud-example.html#.Uus0bvnoSGc</a>
  the sdnext-servlet.xml is as follows</p>
  
  <pre><code>&lt;beans xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xsi:schemalocation="
  http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-3.0.xsd
  http://www.springframework.org/schema/tx
  http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"&gt;
  
  &lt;context:property-placeholder location="classpath:resources/database.properties"&gt;
  &lt;/context:property-placeholder&gt;
  &lt;context:component-scan base-package="com.dineshonjava"&gt;
  &lt;/context:component-scan&gt;
  
  &lt;tx:annotation-driven transaction-manager="hibernateTransactionManager"&gt;
  &lt;/tx:annotation-driven&gt;
  
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" id="jspViewResolver"&gt;
   &lt;property name="viewClass" value="org.springframework.web.servlet.view.JstlView"&gt;&lt;/property&gt;
   &lt;property name="prefix" value="/WEB-INF/views/"&gt;&lt;/property&gt;
   &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.jdbc.datasource.DriverManagerDataSource" id="dataSource"&gt;
   &lt;property name="driverClassName" value="${database.driver}"&gt;&lt;/property&gt;
   &lt;property name="url" value="${database.url}"&gt;&lt;/property&gt;
   &lt;property name="username" value="${database.user}"&gt;&lt;/property&gt;
   &lt;property name="password" value="${database.password}"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" id="sessionFactory"&gt;
   &lt;property name="dataSource" ref="dataSource"&gt;&lt;/property&gt;
   &lt;property name="annotatedClasses"&gt;
    &lt;list&gt;
     &lt;value&gt;com.dineshonjava.model.Employee&lt;/value&gt;
    &lt;/list&gt;
   &lt;/property&gt;
   &lt;property name="hibernateProperties"&gt;
   &lt;props&gt;
    &lt;prop key="hibernate.dialect"&gt;${hibernate.dialect}&lt;/prop&gt;
    &lt;prop key="hibernate.show_sql"&gt;${hibernate.show_sql}&lt;/prop&gt;
    &lt;prop key="hibernate.hbm2ddl.auto"&gt;${hibernate.hbm2ddl.auto}  &lt;/prop&gt;    
          &lt;/props&gt;
        &lt;/property&gt;
  &lt;/bean&gt;
  
    &lt;bean class="org.springframework.orm.hibernate3.HibernateTransactionManager" id="hibernateTransactionManager"&gt;
   &lt;property name="sessionFactory" ref="sessionFactory"&gt;&lt;/property&gt;
    &lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>I am getting the exception</p>
  
  <pre><code>org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 12 in XML document from ServletContext resource [/WEB-INF/config/sdnext-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 62; cvc-elt.1: Cannot find the declaration of element 'beans'.
  </code></pre>
  
  <p>I cannot figure out what is wrong. Please help</p>