Spring 1.1.1 and iBATIS 2.0.7

Another RTFM moment – I was working on retrofitting an old application that used my own persistence framework to use iBATIS SQL Maps with the Spring DAO framework and running into a bizarre error. I kept getting the error: java.lang.NoClassDefFoundError: com/ibatis/db/sqlmap/XmlSqlMapBuilder and it turned out that my DAO implementations were extending SqlMapFactoryBean instead of SqlMapClientFactoryBean. The documentation clearly states that I should use SqlMapClientFactoryBean, but I wasn’t. Thanks to Nilesh for the clarification

By the way, if you haven’t looked at Spring or just it’s DAO framework, you should explore it as it simplifies the development process and minimizes the amount of code you write. I just rewrote some of my POC applications using Spring’s DAO framework that used iBATIS and Hibernate under the covers. By using the template classes provided by Spring, I wrote about 30-40% of the code I would have normally written using iBATIS or Hibernate by themselves.