title: Spring "The prefix "tx" for element "tx:annotation-driven" is not bound."
body: <p>I'm getting the error above on my "tx:annotation-driven" line, but I've declared the namespace at the top of the beans file, why is the following XML causing this error?  </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"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
          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;!-- DispatcherServlet Context: defines this servlet's request-processing 
          infrastructure --&gt;
  
      &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
      &lt;tx:annotation-driven transaction-manager="hibernateTransactionManager"/&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;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
          &lt;beans:property name="suffix" value=".jsp" /&gt;
      &lt;/beans:bean&gt;
  
      &lt;beans:bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
          destroy-method="close"&gt;
          &lt;beans:property name="driverClassName" value="com.mysql.jdbc.Driver" /&gt;
          &lt;beans:property name="url" value="jdbc:mysql://localhost/assessme" /&gt;
          &lt;beans:property name="username" value="assessme" /&gt;
          &lt;beans:property name="password" value="assessme" /&gt;
      &lt;/beans:bean&gt;
  
       &lt;beans:bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
      &lt;beans:property name="annotatedClasses"&gt;
          &lt;beans:list&gt;
              &lt;beans:value&gt;org.assessme.com.entity.User&lt;/beans:value&gt;
          &lt;/beans:list&gt;
      &lt;/beans:property&gt;
          &lt;beans:property name="dataSource" ref="dataSource" /&gt;
          &lt;beans:property name="packagesToScan" value="org.assessme.com.controller.entity" /&gt;
          &lt;beans:property name="hibernateProperties"&gt;
              &lt;beans:props&gt;
                  &lt;beans:prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/beans:prop&gt;
                  &lt;beans:prop key="hibernate.transaction.factory_class"&gt;org.hibernate.transaction.JDBCTransactionFactory&lt;/beans:prop&gt;
                  &lt;beans:prop key="hibernate.show_sql"&gt;true&lt;/beans:prop&gt;
                  &lt;beans:prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/beans:prop&gt;
              &lt;/beans:props&gt;
          &lt;/beans:property&gt;
      &lt;/beans:bean&gt;
  
      &lt;context:component-scan base-package="org.assessme.com." /&gt;
  
      &lt;beans:bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"&gt;
          &lt;beans:property name="mediaTypes"&gt;
              &lt;beans:map&gt;
                  &lt;beans:entry key="html" value="text/html" /&gt;
                  &lt;beans:entry key="json" value="application/json" /&gt;
              &lt;/beans:map&gt;
          &lt;/beans:property&gt;
          &lt;beans:property name="defaultViews"&gt;
              &lt;beans:list&gt;
                  &lt;beans:bean
                      class="org.springframework.web.servlet.view.json.MappingJacksonJsonView"&gt;
                      &lt;beans:property name="prefixJson" value="true" /&gt;
                  &lt;/beans:bean&gt;
              &lt;/beans:list&gt;
          &lt;/beans:property&gt;
      &lt;/beans:bean&gt;
  &lt;beans:bean id="hibernateTransactionManager"
          class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
          &lt;beans:property name="sessionFactory" ref="sessionFactory" /&gt;
      &lt;/beans:bean&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>