title: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'bean' - Spring config problems
body: <p>I'm trying to set up Hibernate 4 with Spring 4, and I have run into some problems configuring it.  Specifically, in my <code>servlet-context.xml</code> file, I followed a guide and added the following code blocks to this file:</p>
  
  <pre><code>&lt;bean id="sessionFactory"
      class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
      &lt;property name="configLocation"&gt;
          &lt;value&gt;/WEB-INF/hibernate.cfg.xml&lt;/value&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
      &lt;props&gt;
          &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
          &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
      &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;tx:annotation-driven /&gt;
  &lt;bean id="transactionManager"
  class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
  &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Both of these display the following error: <code>cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'bean'</code></p>
  
  <p>The session factory bean also displays this error: <code>Cannot locate BeanDefintionParser for element [bean]</code></p>
  
  <p>Here is my entire `servlet-context.xml' file (excluding those two code blocks for brevity's sake, though please notice that they are actually in the file):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:beans="http://www.springframework.org/schema/beans"
  xmlns:context="http://www.springframework.org/schema/context"
  xmlns:tx="http://www.springframework.org/schema/tx"
  xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd"&gt;
  
  &lt;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;
  
  &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
  &lt;annotation-driven /&gt;
  
  &lt;!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --&gt;
  &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
  &lt;!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --&gt;
  &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;!--  &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;--&gt;
      &lt;!--   &lt;beans:property name="suffix" value=".jsp" /&gt; --&gt;
  &lt;/beans:bean&gt;
  
  &lt;context:component-scan base-package="pear.pear.pear" /&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>How can I resolve these issues?</p>