title: Unable to locate Spring NamespaceHandler for XML schema namespace
body: <p>I am running some servlet code in tomcat in eclipse. It's been working fine but today I get the error <code>Unable to locate Spring NamespaceHandler for XML schema namespace</code>. The full error looks like this:</p>
  
  <pre><code>SEVERE: Allocate exception for servlet RunServlet
  org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration     problem: Unable to locate Spring NamespaceHandler for XML schema namespace     [http://www.springframework.org/schema/tx]
  Offending resource: class path resource [spring/dao.xml]
  </code></pre>
  
  <p>I've had a look at other questions regarding this error, but I don't really understand the answers. </p>
  
  <p>When I look at the target libs, I can see that <code>spring-tx-3.0.5.RELEASE.jar</code> is in <code>WEB-INF/lib</code>.</p>
  
  <p>Can anyone help me out? </p>
  
  <p>Thanks so much!</p>
  
  <p>EDIT: <code>dao.xml</code> starts:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
     xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
            http://www.springframework.org/schema/tx
            http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"&gt;
  </code></pre>
  
  <p>EDIT: Not sure if this is relevant, but I'm working on a mac book pro, and the latest mac update updated to Java 1.6, and I just switched over my Java preferences to 1.6.</p>
  
  <p>EDIT: I'm also getting the following message in the Tomcat log, but I think I was getting it before and I don't think it's related, but just in case:</p>
  
  <pre><code>INFO: Starting Servlet Engine: Apache Tomcat/7.0.14
  Jul 6, 2011 11:59:55 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
  INFO: validateJarFile(/Users/bw/Documents/workspace2/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/core/WEB-INF/lib/servlet-api-2.5.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
  </code></pre>
  
  <p>EDIT: Sorry - didn't see your comments. Here's a listing of the <code>WEB-INF</code>.</p>
  
  <pre><code>b-ws-macbook-pro:lib bw$ ls -ltr
  total 13456
  -rw-r--r--  1 bw  staff   62983 May 14 09:26 activation-1.1.jar
  -rw-r--r--  1 bw  staff   53082 May 14 09:26 spring-asm-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff   60686 May 14 09:26 commons-logging-1.1.1.jar
  -rw-r--r--  1 bw  staff   61379 May 14 09:26 spring-oxm-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff    4467 May 14 09:26 aopalliance-1.0.jar
  -rw-r--r--  1 bw  staff  100870 May 14 09:26 spring-context-support-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff   62086 May 14 09:26 commons-pool-1.3.jar
  -rw-r--r--  1 bw  staff  169752 May 14 09:26 spring-expression-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  175412 May 14 09:27 spring-webmvc-portlet-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  121757 May 14 09:27 commons-dbcp-1.2.2.jar
  -rw-r--r--  1 bw  staff  321190 May 14 09:27 spring-aop-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  231922 May 14 09:27 spring-tx-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  334327 May 14 09:27 spring-orm-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  371792 May 14 09:27 mybatis-2.3.5.jar
  -rw-r--r--  1 bw  staff  382442 May 14 09:27 spring-core-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  418977 May 14 09:27 spring-webmvc-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  388864 May 14 09:27 mail-1.4.jar
  -rw-r--r--  1 bw  staff  395587 May 14 09:27 spring-web-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  668861 May 14 09:27 spring-context-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  555410 May 14 09:27 spring-beans-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  385712 May 14 09:27 spring-jdbc-3.0.5.RELEASE.jar
  -rw-r--r--  1 bw  staff  512707 May 14 09:27 mysql-connector-java-5.0.5.jar
  -rw-r--r--  1 bw  staff  610790 May 14 09:27 c3p0-0.9.1.2.jar
  -rw-r--r--  1 bw  staff  391834 May 14 09:27 log4j-1.2.15.jar
  </code></pre>
  
  <p>EDIT:
  Thanks, Christian. It's weird, though, because I DON'T have that file in my jars anyway, and I do list it as provided:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
      &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
      &lt;version&gt;2.5&lt;/version&gt;
      &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>I'm sure I'm missing something here..</p>
  
  <p>EDIT:
  Hmm.. now Tomcat can't even find <code>applicationContext</code>. Something weird going on with my setup, I think.</p>