title: Testing Alfresco Java services
body: <p>I am looking for a method for testing Alfresco repository Java services without the need for deploying to a Tomcat server.</p>
  
  <p>My idea is to start Alfresco embedded from a JUnit testclass, inject the classes I want to test into the Alfresco Spring configuration and test the classes using JUnit test methods.</p>
  
  <p>The Alfresco sample application "FirstFoundationClient" is a good entry point for getting the above working but when I try to start the sample with a H2 memory database in MySQL-mode it outputs the following error:</p>
  
  <pre><code>SqlMapException: The &lt;sqlMap&gt; resource is missing: /alfresco/ibatis/#resource.dialect#/qname-insert-SQLMap.xml
  </code></pre>
  
  <p>My alfresco-global.properties configuration in the sample project:</p>
  
  <pre><code>dir.root=./alf_data
  db.driver=org.h2.Driver
  db.url=jdbc:h2:alf_data/h2_data/alfresco;MODE=MySQL
  db.username=alfresco
  db.password=alfresco
  </code></pre>
  
  <p>Can anyone help me with:</p>
  
  <ul>
  <li><p>how to get FirstFoundationClient (from Alfresco Enterprise SDK 3.4.0) running using a H2 database</p></li>
  <li><p>how to inject the classes under test so I can access them from the Spring application context (like standard Alfresco services are accessed in the FirstFoundationClient sample)</p></li>
  </ul>