Spring 1.1.1 and iBATIS 2.0.7

October 11, 2004

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.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: