title: Spring config XML file with context/jdbc/tx schemalocation
body: <p>I want to use spring autowired with conjunction of jdbc for initial derby data, and jpa.</p>
  
  <p>Currently I try such a config file:</p>
  
  <pre><code>         &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"
            xmlns:context="http://www.springframework.org/schema/context"
            xmlns:jdbc="http://www.springframework.org/schema/jdbc" 
            xsi:schemaLocation="
              http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd  
              http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-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/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd"&gt;
  
      &lt;bean id="dataSource"
              class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
              &lt;property name="driverClassName" value="org.apache.derby.jdbc.EmbeddedDriver" /&gt;
              &lt;property name="url"
                  value="jdbc:derby:target/database/message;create=true" /&gt;
              &lt;property name="username" value="app" /&gt;
              &lt;property name="password" value="app" /&gt;
          &lt;/bean&gt;
  
          &lt;jdbc:embedded-database id="embedded" type="DERBY" /&gt;
  
          &lt;jdbc:initialize-database data-source="dataSource"&gt;
              &lt;jdbc:script location="classpath:resources/dbscripts/createDB.sql" /&gt;
          &lt;/jdbc:initialize-database&gt;
  
  ...
  
          &lt;tx:annotation-driven transaction-manager="transactionManager" /&gt; 
  ...
      &lt;context:component-scan base-package="com.ba" /&gt;
      &lt;context:annotation-config /&gt;
  </code></pre>
  
  <p>Unfortunately whatever I do I have one of errors like</p>
  
  <pre><code>Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/jdbc]
  </code></pre>
  
  <p>or the same for context, tx namespaces</p>
  
  <p>Pom.xml file of maven is:</p>
  
  <pre><code>      &lt;properties&gt;
      &lt;org.springframework.version&gt;3.0.5.RELEASE&lt;/org.springframework.version&gt;
      &lt;org.openjpa.version&gt;2.0.0&lt;/org.openjpa.version&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  &lt;/properties&gt;
        &lt;dependencies&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;junit&lt;/groupId&gt;
        &lt;artifactId&gt;junit&lt;/artifactId&gt;
        &lt;version&gt;4.8.2&lt;/version&gt;      
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-discovery&lt;/groupId&gt;
          &lt;artifactId&gt;commons-discovery&lt;/artifactId&gt;
          &lt;version&gt;20040218.194635&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
      &lt;groupId&gt;commons-io&lt;/groupId&gt;
          &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
          &lt;version&gt;2.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-codec&lt;/groupId&gt;
          &lt;artifactId&gt;commons-codec&lt;/artifactId&gt;
          &lt;version&gt;1.8&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-validator&lt;/groupId&gt;
          &lt;artifactId&gt;commons-validator&lt;/artifactId&gt;
          &lt;version&gt;1.3.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;commons-collections&lt;/groupId&gt;
          &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;
          &lt;version&gt;3.2.1&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
         &lt;groupId&gt;commons-lang&lt;/groupId&gt;
         &lt;artifactId&gt;commons-lang&lt;/artifactId&gt;
         &lt;version&gt;2.6&lt;/version&gt;
      &lt;/dependency&gt;           
  
  
      &lt;dependency&gt;
          &lt;groupId&gt;jstl&lt;/groupId&gt;
          &lt;artifactId&gt;jstl&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
      &lt;/dependency&gt;
  
       &lt;dependency&gt;
        &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
        &lt;artifactId&gt;derby&lt;/artifactId&gt;
        &lt;version&gt;10.10.1.1&lt;/version&gt;
      &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
              &lt;artifactId&gt;geronimo-jpa_3.0_spec&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.openjpa&lt;/groupId&gt;
              &lt;artifactId&gt;openjpa-all&lt;/artifactId&gt;
              &lt;version&gt;${org.openjpa.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.geronimo.specs&lt;/groupId&gt;
              &lt;artifactId&gt;geronimo-jta_1.1_spec&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-oxm&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-test&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
              &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-jdbc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-tx&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
      &lt;/dependency&gt;
  
          &lt;dependency&gt;
                 &lt;groupId&gt;javax.validation&lt;/groupId&gt;
                 &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
                 &lt;version&gt;1.1.0.Final&lt;/version&gt;
          &lt;/dependency&gt;
  
  
      &lt;dependency&gt;
                   &lt;groupId&gt;log4j&lt;/groupId&gt;
              &lt;artifactId&gt;log4j&lt;/artifactId&gt;
          &lt;version&gt;1.2.16&lt;/version&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
  </code></pre>
  
  <p>There are a lot of topics on it within stackoverflow, but either without context, or without jdbc or tx...</p>
  
  <p>Does anyone know how to fix it? Or a good free tool for it?</p>