title: "unable to locate Spring NamespaceHandler" error
body: <p>I'm creating a stand-alone Sava application with Spring, to handle the JDBC access. The application works fine on every test and I decided that I need a jar to be deployed our clients.</p>
  
  <p>They might not have spring in their classpath, so I used maven-assembly-plugin to handle the jar creation with dependencies.</p>
  
  <p>However when I try to run the application:</p>
  
  <pre><code>java -jar target/myproject-0.0.1-SNAPSHOT-jar-with-dependencies.jar
  </code></pre>
  
  <p>Which throws the following error:</p>
  
  <pre><code>Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/p]
  Offending resource: class path resource [applicationContext.xml]
  
  at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
  at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
  at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:80)
  ...and so on to the database access class of this project.
  </code></pre>
  
  <p>The applicationContext.xml file is in projectbase/src/main/resources. And its placed at target/packagename base.</p>
  
  <p>The applicationContext.xml</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:p="http://www.springframework.org/schema/p"
     xmlns:context="http://www.springframework.org/schema/context"
     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"&gt;
  
  
      &lt;bean id="dataSourceDesenv" class="org.apache.commons.dbcp.BasicDataSource"... /&gt;
  
      &lt;bean id="simpleJdbcDaoSupport" class="org.springframework.jdbc.core.simple.SimpleJdbcDaoSupport"
        p:dataSource-ref="dataSourceDesenv" /&gt;
  
      &lt;bean id="simpleJdbcTemplate" class="org.springframework.jdbc.core.simple.SimpleJdbcTemplate"&gt;
          &lt;constructor-arg ref="dataSourceDesenv" /&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>