title: java.lang.IllegalArgumentException: No SqlMapClient specified
body: <p>I'm trying to JUnit a DAO which accesses iBatis. The problem is iBatis cannot read SqlMapClient although I specified it in <code>applicationContext.xml</code>. So I tried to set full path for it but I still get errors.</p>
  
  <p>applicationContext.xml</p>
  
  <pre><code>&lt;!-- Sql Map Client --&gt;
  &lt;bean id="sqlMapClient" class="org.springframework.orm.ibatis.SqlMapClientFactoryBean"&gt;
      &lt;property name="configLocation" value="file:C:/workspace/MyProject/WebContent/WEB-INF/sqlMapConfig.xml" /&gt;
      &lt;property name="dataSource" ref="dataSource"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>JUnit Code</p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(
  locations={
    "file:C:/workspace/MyProject/WebContent/WEB-INF/sqlMapConfig.xml",
    "file:C:/workspace/MyProject/WebContent/WEB-INF/applicationContext.xml",
    "file:C:/workspace/MyProject/WebContent/WEB-INF/dataSource.xml",  
  }
  )
  
  // This doesn't work
  //locations={
  //"classpath:/WEB-INF/sqlMapConfig.xml",
  //"classpath:/WEB-INF/applicationContext.xml",
  //"classpath:/WEB-INF/dataSource.xml",
  //}
  
  public class ProductDaoTest {
      /**
       * Run the List&lt;Product&gt; getProductList(Product) method test.
       *
       * @throws Exception
       *
       * @generatedBy CodePro at 7/1/13 10:55 AM
       */
      @Test
      public void testGetProductList()
          throws Exception {
          ProductDao fixture = new ProductDao();
          Product product = new Product();
  
          List&lt;Product&gt; result = fixture.getProductList(product);
          assertNotNull(result);
      }
  }
  </code></pre>
  
  <p>I get this error</p>
  
  <pre><code>java.lang.IllegalArgumentException: No SqlMapClient specified
      at org.springframework.util.Assert.notNull(Assert.java:112)
      at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:166)
      at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:249)
      at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:296)
      at net.rcba.dao.BrandDao.getBrandRankingSumViewList(BrandDao.java:19)
      at net.rcba.dao.BrandDaoTest.testGetBrandRankingSumViewList_1(BrandDaoTest.java:53)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
      at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)
      at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
      at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  </code></pre>