title: add new person using ibatis in mysql DB
body: <p>i want to add person in database using ibatis in j2EE application.
  I have a table person in mySQL, servlet,SqlMapConfix.xml,Person.xml and Person.java.
  i did many tests but i had the same error.</p>
  
  <p>java.lang.RuntimeException: Error occurred. Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'. Cause: java.io.IOException: Could not find resource config/Person.xml</p>
  
  <p>here the code :
  index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;TODO supply a title&lt;/title&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width"&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form action="Controller" &gt;
          &lt;input type="text"  name="nom"&gt;
          &lt;input type="text"  name="pren"&gt;
          &lt;input type="submit" value="ok"&gt;
      &lt;/form&gt; 
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>servlet: Controller.java</p>
  
  <pre><code>protected void processRequest(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
      response.setContentType("text/html;charset=UTF-8");
   PrintWriter out = response.getWriter();
   String a = request.getParameter("nom");
    String b = request.getParameter("pren");
  
  try{
  
   Reader rd;
    rd = Resources.getResourceAsReader("config/SqlMapConfig.xml");
  
  
    SqlMapClient smc; 
    smc = SqlMapClientBuilder.buildSqlMapClient(rd);
      out.println("Going to insert record.....");
    Person em = new Person(a, b);
  
    smc.insert("Person.insert", em); 
  
     out.println("Record Inserted Successfully ");
  
     }catch(SQLException e)
    {e.printStackTrace();}
  
   }
  </code></pre>
  
  <p>Person.java</p>
  
  <pre><code>package controleur;
  
  public class Person {
  String nom,prenom;
  
  public Person(String nom, String prenom) {
      this.nom = nom;
      this.prenom = prenom;
  }
  
  public String getNom() {
      return nom;
  }
  
  public void setNom(String nom) {
      this.nom = nom;
  }
  
  public String getPrenom() {
      return prenom;
  }
  
  public void setPrenom(String prenom) {
      this.prenom = prenom;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Person.xml</p>
  
  <pre><code>   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE sqlMap PUBLIC "-//ibis.apache.org//DTD SQL Map 2.0//EN"    "http://ibatis.apache.org/dtd/sql-map-2.dtd"&gt;
  
  &lt;sqlMap namespace="Person"&gt;
  &lt;insert id="insert" parameterClass="controleur.Person" &gt;
  insert into person(nom, pren)values(#nom#, #prenom#)
  &lt;/insert&gt;
  &lt;/sqlMap&gt;
  </code></pre>
  
  <p>SqlMapConfig.xml</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;!DOCTYPE sqlMapConfig
      PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-config-2.dtd"&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;settings useStatementNamespaces="true"&gt;&lt;/settings&gt;
  &lt;transactionManager type="JDBC"&gt;
  &lt;dataSource type="simple"&gt;
   &lt;property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/&gt;
  &lt;property name="JDBC.ConnectionURL"      value="jdbc:mysql://localhost:3306/parc"/&gt;
  &lt;property name="JDBC.Username" value="root"/&gt;
  &lt;property name="JDBC.Password" value=""/&gt;
  &lt;/dataSource&gt;
  &lt;/transactionManager&gt;
  &lt;sqlMap resource="config/Person.xml "/&gt;
  </code></pre>
  
  <p></p>
  
  <p>i used two package: package config contains *.xml files and package controleur contains the servlet and the java class.
  thanks</p>